update dev300-m58
[ooovba.git] / extensions / source / bibliography / bibcont.hxx
blob5265ab9f3db8dabbf4515a16e0d9bb025c39cff5
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: bibcont.hxx,v $
10 * $Revision: 1.10 $
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 ************************************************************************/
31 #ifndef ADDRCONT_HXX
32 #define ADDRCONT_HXX
34 #include <com/sun/star/frame/XFrame.hpp>
35 #include <vcl/splitwin.hxx>
36 #include <vcl/timer.hxx>
37 #include "bibshortcuthandler.hxx"
39 #include "bibmod.hxx"
41 #define TOP_WINDOW 1
42 #define BOTTOM_WINDOW 2
44 class BibDataManager;
46 class BibWindowContainer : public BibWindow //Window
48 private:
49 // !BibShortCutHandler is also always a Window!
50 BibShortCutHandler* pChild;
52 protected:
53 virtual void Resize();
55 public:
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
76 private:
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;
87 sal_Bool bFirstTime;
88 HdlBibModul pBibMod;
89 Timer aTimer;
91 DECL_LINK( SplitHdl, Timer*);
93 protected:
95 virtual void Split();
97 virtual long PreNotify( NotifyEvent& rNEvt );
99 public:
101 BibBookContainer(Window* pParent,BibDataManager*, WinBits nStyle = WB_3DLOOK );
102 ~BibBookContainer();
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
117 #endif