Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 : #ifndef INCLUDED_EXTENSIONS_SOURCE_BIBLIOGRAPHY_BIBVIEW_HXX
20 : #define INCLUDED_EXTENSIONS_SOURCE_BIBLIOGRAPHY_BIBVIEW_HXX
21 :
22 : #include <com/sun/star/beans/XPropertySet.hpp>
23 : #include <com/sun/star/awt/XControlContainer.hpp>
24 : #include "formcontrolcontainer.hxx"
25 : #include "bibshortcuthandler.hxx"
26 :
27 : class BibGeneralPage;
28 : class BibDataManager;
29 :
30 : namespace com{ namespace sun{ namespace star{ namespace awt{ class XFocusListener;}}}}
31 :
32 :
33 : namespace bib
34 : {
35 :
36 :
37 : class BibView;
38 0 : class BibViewFormControlContainer : public FormControlContainer
39 : {
40 : private:
41 : VclPtr<BibView> mpBibView;
42 : protected:
43 : // FormControlContainer
44 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >
45 : getControlContainer() SAL_OVERRIDE;
46 : // XLoadListener equivalents
47 : virtual void _loaded( const ::com::sun::star::lang::EventObject& _rEvent ) SAL_OVERRIDE;
48 : virtual void _reloaded( const ::com::sun::star::lang::EventObject& _rEvent ) SAL_OVERRIDE;
49 : public:
50 : using FormControlContainer::connectForm;
51 : using FormControlContainer::disconnectForm;
52 : using FormControlContainer::isFormConnected;
53 : BibViewFormControlContainer(BibView *pBibView);
54 : };
55 :
56 : class BibView : public BibWindow
57 : {
58 : private:
59 : BibDataManager* m_pDatMan;
60 : ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable> m_xDatMan;
61 : ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener> m_xGeneralPage;
62 : VclPtr<BibGeneralPage> m_pGeneralPage;
63 : BibViewFormControlContainer m_aFormControlContainer;
64 :
65 : private:
66 : DECL_LINK(CallMappingHdl, BibView*);
67 :
68 : public:
69 : // Window overridables
70 : virtual void Resize() SAL_OVERRIDE;
71 :
72 : public:
73 : BibView( vcl::Window* _pParent, BibDataManager* _pDatMan, WinBits nStyle = WB_3DLOOK );
74 : virtual ~BibView();
75 : virtual void dispose() SAL_OVERRIDE;
76 :
77 : void UpdatePages();
78 : css::uno::Reference< css::awt::XControlContainer > getControlContainer();
79 :
80 : virtual void GetFocus() SAL_OVERRIDE;
81 :
82 : virtual bool HandleShortCutKey( const KeyEvent& rKeyEvent ) SAL_OVERRIDE; // returns true, if key was handled
83 : };
84 :
85 :
86 : } // namespace bib
87 :
88 :
89 : #endif
90 :
91 :
92 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|