1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _BIB_VIEW_HXX
24 #define _BIB_VIEW_HXX
25 
26 #include <com/sun/star/beans/XPropertySet.hpp>
27 #include <com/sun/star/awt/XControlContainer.hpp>
28 #include "formcontrolcontainer.hxx"
29 #include "bibshortcuthandler.hxx"
30 
31 class	BibGeneralPage;
32 class	BibDataManager;
33 
34 namespace com{ namespace sun{ namespace star{ namespace awt{ class XFocusListener;}}}}
35 
36 //.........................................................................
37 namespace bib
38 {
39 //.........................................................................
40 
41 	// -----------------------------------------------------------------------
42 	class BibView : public BibWindow, public FormControlContainer
43 	{
44 	private:
45 		BibDataManager*																m_pDatMan;
46 		::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable> 		m_xDatMan;
47 		::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener> 	m_xGeneralPage;
48 		BibGeneralPage*																m_pGeneralPage;
49 
50 	private:
51 		DECL_STATIC_LINK(BibView, CallMappingHdl, BibView*);
52 
53 	protected:
54 		// Window overridables
55 			virtual void	Resize();
56 
57 		// FormControlContainer
58 		virtual	::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >
59 							getControlContainer();
60 
61 		// XLoadListener equivalents
62 		virtual void		_loaded( const ::com::sun::star::lang::EventObject& _rEvent );
63 		virtual void		_reloaded( const ::com::sun::star::lang::EventObject& _rEvent );
64 
65 	public:
66 							BibView( Window* _pParent, BibDataManager* _pDatMan, WinBits nStyle = WB_3DLOOK );
67 							~BibView();
68 
69 		void				UpdatePages();
70 
71 		virtual void		GetFocus();
72 
73 		virtual sal_Bool		HandleShortCutKey( const KeyEvent& rKeyEvent );	// returns true, if key was handled
74 	};
75 
76 //.........................................................................
77 }	// namespace bib
78 //.........................................................................
79 
80 #endif
81 
82 
83