Impress Remote 1.0.5, tag sdremote-1.0.5
[LibreOffice.git] / extensions / source / bibliography / bibcont.hxx
blobcb5bbee09bb1b5235ce029644489975fc0d1a71a
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
20 #ifndef ADDRCONT_HXX
21 #define ADDRCONT_HXX
23 #include <com/sun/star/frame/XFrame.hpp>
24 #include <vcl/splitwin.hxx>
25 #include <vcl/timer.hxx>
26 #include "bibshortcuthandler.hxx"
28 #include "bibmod.hxx"
30 #define TOP_WINDOW 1
31 #define BOTTOM_WINDOW 2
33 class BibWindowContainer : public BibWindow //Window
35 private:
36 // !BibShortCutHandler is also always a Window!
37 BibShortCutHandler* pChild;
39 protected:
40 virtual void Resize();
42 public:
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
63 private:
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;
73 HdlBibModul pBibMod;
74 Timer aTimer;
76 DECL_LINK( SplitHdl, Timer*);
78 protected:
80 virtual void Split();
82 virtual long PreNotify( NotifyEvent& rNEvt );
84 public:
86 BibBookContainer(Window* pParent, WinBits nStyle = WB_3DLOOK );
87 ~BibBookContainer();
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
102 #endif
104 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */