bump product version to 5.0.4.1
[LibreOffice.git] / extensions / source / bibliography / bibcont.hxx
blobcb1d07e6a1edbdcdeaf60a51b7c16f13b74db614
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 INCLUDED_EXTENSIONS_SOURCE_BIBLIOGRAPHY_BIBCONT_HXX
21 #define INCLUDED_EXTENSIONS_SOURCE_BIBLIOGRAPHY_BIBCONT_HXX
23 #include <com/sun/star/frame/XFrame.hpp>
24 #include <vcl/splitwin.hxx>
25 #include <vcl/timer.hxx>
26 #include <vcl/idle.hxx>
27 #include "bibshortcuthandler.hxx"
29 #include "bibmod.hxx"
31 #define TOP_WINDOW 1
32 #define BOTTOM_WINDOW 2
34 class BibWindowContainer : public BibWindow //Window
36 private:
37 // !BibShortCutHandler is also always a Window!
38 BibShortCutHandler* pChild;
40 protected:
41 virtual void Resize() SAL_OVERRIDE;
43 public:
44 BibWindowContainer( vcl::Window* pParent, BibShortCutHandler* pChild, WinBits nStyle = WB_3DLOOK);
45 virtual ~BibWindowContainer();
46 virtual void dispose() SAL_OVERRIDE;
48 inline vcl::Window* GetChild();
50 virtual void GetFocus() SAL_OVERRIDE;
52 virtual bool HandleShortCutKey( const KeyEvent& rKeyEvent ) SAL_OVERRIDE; // returns true, if key was handled
54 using Window::GetChild;
57 inline vcl::Window* BibWindowContainer::GetChild()
59 return pChild ? pChild->GetWindow() : NULL;
63 class BibBookContainer: public BibSplitWindow
65 private:
67 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xTopFrameRef;
68 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xBottomFrameRef;
70 ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > xTopPeerRef;
71 ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > xBottomPeerRef;
73 VclPtr<BibWindowContainer> pTopWin;
74 VclPtr<BibWindowContainer> pBottomWin;
75 HdlBibModul pBibMod;
76 Idle aIdle;
78 DECL_LINK_TYPED( SplitHdl, Idle*, void );
80 protected:
82 virtual void Split() SAL_OVERRIDE;
84 virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
86 public:
88 BibBookContainer(vcl::Window* pParent, WinBits nStyle = WB_3DLOOK );
89 virtual ~BibBookContainer();
90 virtual void dispose() SAL_OVERRIDE;
92 inline BibWindow* GetTopWin() {return pTopWin;}
93 inline BibWindow* GetBottomWin() {return pBottomWin;}
95 // !BibShortCutHandler is also always a Window!
96 void createTopFrame( BibShortCutHandler* pWin );
98 void createBottomFrame( BibShortCutHandler* pWin );
100 virtual void GetFocus() SAL_OVERRIDE;
102 virtual bool HandleShortCutKey( const KeyEvent& rKeyEvent ) SAL_OVERRIDE; // returns true, if key was handled
105 #endif
107 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */