Version 6.4.0.0.beta1, tag libreoffice-6.4.0.0.beta1
[LibreOffice.git] / extensions / source / bibliography / bibcont.hxx
blob8574f36dc4baea3b2e1e343efe1058e2b1cea1f3
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() override;
43 public:
44 BibWindowContainer( vcl::Window* pParent, BibShortCutHandler* pChild);
45 virtual ~BibWindowContainer() override;
46 virtual void dispose() override;
48 inline vcl::Window* GetChild();
50 virtual void GetFocus() override;
52 virtual bool HandleShortCutKey( const KeyEvent& rKeyEvent ) override; // returns true, if key was handled
54 using Window::GetChild;
57 inline vcl::Window* BibWindowContainer::GetChild()
59 return pChild ? pChild->GetWindow() : nullptr;
63 class BibBookContainer: public BibSplitWindow
65 private:
67 VclPtr<BibWindowContainer> pTopWin;
68 VclPtr<BibWindowContainer> pBottomWin;
69 HdlBibModul pBibMod;
70 Idle aIdle;
72 DECL_LINK( SplitHdl, Timer*, void );
74 protected:
76 virtual void Split() override;
78 virtual bool PreNotify( NotifyEvent& rNEvt ) override;
80 public:
82 explicit BibBookContainer(vcl::Window* pParent );
83 virtual ~BibBookContainer() override;
84 virtual void dispose() override;
86 // !BibShortCutHandler is also always a Window!
87 void createTopFrame( BibShortCutHandler* pWin );
89 void createBottomFrame( BibShortCutHandler* pWin );
91 virtual void GetFocus() override;
93 virtual bool HandleShortCutKey( const KeyEvent& rKeyEvent ) override; // returns true, if key was handled
96 #endif
98 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */