1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: bibcont.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
34 #include <com/sun/star/frame/XFrame.hpp>
35 #include <vcl/splitwin.hxx>
36 #include <vcl/timer.hxx>
37 #include "bibshortcuthandler.hxx"
42 #define BOTTOM_WINDOW 2
46 class BibWindowContainer
: public BibWindow
//Window
49 // !BibShortCutHandler is also always a Window!
50 BibShortCutHandler
* pChild
;
53 virtual void Resize();
56 BibWindowContainer( Window
* pParent
, BibShortCutHandler
* pChild
, WinBits nStyle
= WB_3DLOOK
);
57 ~BibWindowContainer();
59 inline Window
* GetChild();
61 virtual void GetFocus();
63 virtual BOOL
HandleShortCutKey( const KeyEvent
& rKeyEvent
); // returns true, if key was handled
65 using Window::GetChild
;
68 inline Window
* BibWindowContainer::GetChild()
70 return pChild
? pChild
->GetWindow() : NULL
;
74 class BibBookContainer
: public BibSplitWindow
78 ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XFrame
> xTopFrameRef
;
79 ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XFrame
> xBottomFrameRef
;
81 ::com::sun::star::uno::Reference
< ::com::sun::star::awt::XWindow
> xTopPeerRef
;
82 ::com::sun::star::uno::Reference
< ::com::sun::star::awt::XWindow
> xBottomPeerRef
;
84 BibDataManager
* pDatMan
;
85 BibWindowContainer
* pTopWin
;
86 BibWindowContainer
* pBottomWin
;
91 DECL_LINK( SplitHdl
, Timer
*);
97 virtual long PreNotify( NotifyEvent
& rNEvt
);
101 BibBookContainer(Window
* pParent
,BibDataManager
*, WinBits nStyle
= WB_3DLOOK
);
104 inline BibWindow
* GetTopWin() {return pTopWin
;}
105 inline BibWindow
* GetBottomWin() {return pBottomWin
;}
107 // !BibShortCutHandler is also always a Window!
108 void createTopFrame( BibShortCutHandler
* pWin
);
110 void createBottomFrame( BibShortCutHandler
* pWin
);
112 virtual void GetFocus();
114 virtual sal_Bool
HandleShortCutKey( const KeyEvent
& rKeyEvent
); // returns true, if key was handled