1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
23 #include <com/sun/star/frame/XFrame.hpp>
24 #include <vcl/splitwin.hxx>
25 #include <vcl/timer.hxx>
26 #include "bibshortcuthandler.hxx"
31 #define BOTTOM_WINDOW 2
33 class BibWindowContainer
: public BibWindow
//Window
36 // !BibShortCutHandler is also always a Window!
37 BibShortCutHandler
* pChild
;
40 virtual void Resize();
43 BibWindowContainer( Window
* pParent
, BibShortCutHandler
* pChild
, WinBits nStyle
= WB_3DLOOK
);
44 ~BibWindowContainer();
46 inline Window
* GetChild();
48 virtual void GetFocus();
50 virtual sal_Bool
HandleShortCutKey( const KeyEvent
& rKeyEvent
); // returns true, if key was handled
52 using Window::GetChild
;
55 inline Window
* BibWindowContainer::GetChild()
57 return pChild
? pChild
->GetWindow() : NULL
;
61 class BibBookContainer
: public BibSplitWindow
65 ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XFrame
> xTopFrameRef
;
66 ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XFrame
> xBottomFrameRef
;
68 ::com::sun::star::uno::Reference
< ::com::sun::star::awt::XWindow
> xTopPeerRef
;
69 ::com::sun::star::uno::Reference
< ::com::sun::star::awt::XWindow
> xBottomPeerRef
;
71 BibWindowContainer
* pTopWin
;
72 BibWindowContainer
* pBottomWin
;
76 DECL_LINK( SplitHdl
, Timer
*);
82 virtual long PreNotify( NotifyEvent
& rNEvt
);
86 BibBookContainer(Window
* pParent
, WinBits nStyle
= WB_3DLOOK
);
89 inline BibWindow
* GetTopWin() {return pTopWin
;}
90 inline BibWindow
* GetBottomWin() {return pBottomWin
;}
92 // !BibShortCutHandler is also always a Window!
93 void createTopFrame( BibShortCutHandler
* pWin
);
95 void createBottomFrame( BibShortCutHandler
* pWin
);
97 virtual void GetFocus();
99 virtual sal_Bool
HandleShortCutKey( const KeyEvent
& rKeyEvent
); // returns true, if key was handled
104 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */