xref: /aoo41x/main/framework/inc/services/frame.hxx (revision 570f3dc5)
1f8e07b45SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3f8e07b45SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4f8e07b45SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5f8e07b45SAndrew Rist  * distributed with this work for additional information
6f8e07b45SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7f8e07b45SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8f8e07b45SAndrew Rist  * "License"); you may not use this file except in compliance
9f8e07b45SAndrew Rist  * with the License.  You may obtain a copy of the License at
10f8e07b45SAndrew Rist  *
11f8e07b45SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12f8e07b45SAndrew Rist  *
13f8e07b45SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14f8e07b45SAndrew Rist  * software distributed under the License is distributed on an
15f8e07b45SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16f8e07b45SAndrew Rist  * KIND, either express or implied.  See the License for the
17f8e07b45SAndrew Rist  * specific language governing permissions and limitations
18f8e07b45SAndrew Rist  * under the License.
19f8e07b45SAndrew Rist  *
20f8e07b45SAndrew Rist  *************************************************************/
21f8e07b45SAndrew Rist 
22f8e07b45SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef __FRAMEWORK_SERVICES_FRAME_HXX_
25cdf0e10cSrcweir #define __FRAMEWORK_SERVICES_FRAME_HXX_
26cdf0e10cSrcweir 
27cdf0e10cSrcweir //_________________________________________________________________________________________________________________
28cdf0e10cSrcweir //	my own includes
29cdf0e10cSrcweir //_________________________________________________________________________________________________________________
30cdf0e10cSrcweir 
31cdf0e10cSrcweir #include <classes/framecontainer.hxx>
32cdf0e10cSrcweir #include <classes/propertysethelper.hxx>
33cdf0e10cSrcweir #include <threadhelp/resetableguard.hxx>
34cdf0e10cSrcweir #include <threadhelp/writeguard.hxx>
35cdf0e10cSrcweir #include <threadhelp/readguard.hxx>
36cdf0e10cSrcweir #include <threadhelp/threadhelpbase.hxx>
37cdf0e10cSrcweir 
38cdf0e10cSrcweir #ifndef __FRAMEWORK_THREADHELP_TRANSACTIONBASE_HXX_
39cdf0e10cSrcweir #include <threadhelp/transactionbase.hxx>
40cdf0e10cSrcweir #endif
41cdf0e10cSrcweir #include <macros/generic.hxx>
42cdf0e10cSrcweir #include <macros/debug.hxx>
43cdf0e10cSrcweir #include <macros/xinterface.hxx>
44cdf0e10cSrcweir #include <macros/xtypeprovider.hxx>
45cdf0e10cSrcweir #include <macros/xserviceinfo.hxx>
46cdf0e10cSrcweir #include <general.h>
47cdf0e10cSrcweir 
48cdf0e10cSrcweir //_________________________________________________________________________________________________________________
49cdf0e10cSrcweir //	interface includes
50cdf0e10cSrcweir //_________________________________________________________________________________________________________________
51cdf0e10cSrcweir #include <com/sun/star/frame/XDispatchInformationProvider.hpp>
52cdf0e10cSrcweir #include <com/sun/star/frame/XComponentLoader.hpp>
53cdf0e10cSrcweir #include <com/sun/star/frame/XController.hpp>
54cdf0e10cSrcweir #include <com/sun/star/frame/XDispatch.hpp>
55cdf0e10cSrcweir #include <com/sun/star/frame/XDispatchProvider.hpp>
56cdf0e10cSrcweir #include <com/sun/star/frame/XDispatchRecorderSupplier.hpp>
57cdf0e10cSrcweir #include <com/sun/star/frame/XDispatchProviderInterception.hpp>
58cdf0e10cSrcweir #include <com/sun/star/frame/XDispatchProviderInterceptor.hpp>
59cdf0e10cSrcweir #include <com/sun/star/lang/XEventListener.hpp>
60cdf0e10cSrcweir #include <com/sun/star/frame/XFrame.hpp>
61cdf0e10cSrcweir #include <com/sun/star/frame/XFrameActionListener.hpp>
62cdf0e10cSrcweir #include <com/sun/star/frame/XFrames.hpp>
63cdf0e10cSrcweir #include <com/sun/star/frame/XFramesSupplier.hpp>
64cdf0e10cSrcweir #include <com/sun/star/frame/XTitle.hpp>
65cdf0e10cSrcweir #include <com/sun/star/frame/XTitleChangeBroadcaster.hpp>
66cdf0e10cSrcweir #include <com/sun/star/task/XStatusIndicator.hpp>
67cdf0e10cSrcweir #include <com/sun/star/task/XStatusIndicatorFactory.hpp>
68cdf0e10cSrcweir #include <com/sun/star/awt/XTopWindowListener.hpp>
69cdf0e10cSrcweir #include <com/sun/star/awt/XWindow.hpp>
70cdf0e10cSrcweir #include <com/sun/star/awt/XTopWindow.hpp>
71cdf0e10cSrcweir #include <com/sun/star/awt/XWindowListener.hpp>
72cdf0e10cSrcweir #include <com/sun/star/awt/XFocusListener.hpp>
73cdf0e10cSrcweir #include <com/sun/star/awt/FocusEvent.hpp>
74cdf0e10cSrcweir #include <com/sun/star/datatransfer/dnd/XDropTargetListener.hpp>
75cdf0e10cSrcweir #include <com/sun/star/document/XActionLockable.hpp>
76cdf0e10cSrcweir #include <com/sun/star/util/XCloseable.hpp>
77cdf0e10cSrcweir #include <com/sun/star/frame/XLayoutManager.hpp>
78cdf0e10cSrcweir 
79cdf0e10cSrcweir //_________________________________________________________________________________________________________________
80cdf0e10cSrcweir //	other includes
81cdf0e10cSrcweir //_________________________________________________________________________________________________________________
82cdf0e10cSrcweir #include <unotools/cmdoptions.hxx>
83cdf0e10cSrcweir #include <cppuhelper/interfacecontainer.hxx>
84cdf0e10cSrcweir #include <cppuhelper/weak.hxx>
85cdf0e10cSrcweir #include <rtl/string.hxx>
86cdf0e10cSrcweir 
87cdf0e10cSrcweir //_________________________________________________________________________________________________________________
88cdf0e10cSrcweir //	namespace
89cdf0e10cSrcweir //_________________________________________________________________________________________________________________
90cdf0e10cSrcweir 
91cdf0e10cSrcweir namespace framework{
92cdf0e10cSrcweir 
93cdf0e10cSrcweir //_________________________________________________________________________________________________________________
94cdf0e10cSrcweir //	exported const
95cdf0e10cSrcweir //_________________________________________________________________________________________________________________
96cdf0e10cSrcweir 
97cdf0e10cSrcweir // This enum can be used to set differnt active states of frames
98cdf0e10cSrcweir enum EActiveState
99cdf0e10cSrcweir {
100cdf0e10cSrcweir 	E_INACTIVE		,	// I'am not a member of active path in tree and i don't have the focus.
101cdf0e10cSrcweir 	E_ACTIVE		,	// I'am in the middle of an active path in tree and i don't have the focus.
102cdf0e10cSrcweir 	E_FOCUS				// I have the focus now. I must a member of an active path!
103cdf0e10cSrcweir };
104cdf0e10cSrcweir 
105cdf0e10cSrcweir //_________________________________________________________________________________________________________________
106cdf0e10cSrcweir //	exported definitions
107cdf0e10cSrcweir //_________________________________________________________________________________________________________________
108cdf0e10cSrcweir 
109cdf0e10cSrcweir /*-************************************************************************************************************//**
110cdf0e10cSrcweir 	@short		implements a normal frame of hierarchy
111cdf0e10cSrcweir     @descr      An instance of these class can be a normal node in frame tree. A frame support influencing of his
112cdf0e10cSrcweir                 subtree, find of subframes, activate- and deactivate-mechanism as well as
113cdf0e10cSrcweir 				set/get of a frame window, component or controller.
114cdf0e10cSrcweir 
115cdf0e10cSrcweir 	@attention	This implementation supports three states: a)uninitialized, b)working, c)disposed
116cdf0e10cSrcweir 				If you call wrong methods in modes a) or c) ... you will get some exceptions.
117cdf0e10cSrcweir 				How you should work with this service:
118cdf0e10cSrcweir 					i) 		create it by using "xServiceManager->createInstance(...)"
119cdf0e10cSrcweir 					ii)		call XInitialization::initialize() with a valid window reference or use createInstanceWithArguments() at i)
120cdf0e10cSrcweir 					iii)	works with object
121cdf0e10cSrcweir 					iv)		dispose object by calling XComponent::dispose()
122cdf0e10cSrcweir 				After iv) all further requests are rejected by exceptions! (DisposedException)
123cdf0e10cSrcweir 
124cdf0e10cSrcweir     @base       ThreadHelpBase
125cdf0e10cSrcweir                     help to guarantee correct initialized lock member at startup
126cdf0e10cSrcweir     @base       TransactionBase
127cdf0e10cSrcweir                     help to implement unbreakable interface calls
128cdf0e10cSrcweir     @base       OBroadcastHelper
129cdf0e10cSrcweir 				OPropertySetHelper
130cdf0e10cSrcweir                     implements the property set
131cdf0e10cSrcweir     @base       OWeakObject
132cdf0e10cSrcweir                     provides the refcount and XInterface, XWeak
133cdf0e10cSrcweir 
134cdf0e10cSrcweir 	@devstatus	ready to use
135cdf0e10cSrcweir 	@threadsafe	yes
136cdf0e10cSrcweir     @modified   04.10.2004 10:47, as96863
137cdf0e10cSrcweir *//*-*************************************************************************************************************/
138cdf0e10cSrcweir class Frame	:	// interfaces
139cdf0e10cSrcweir 				public	css::lang::XTypeProvider					,
140cdf0e10cSrcweir 				public	css::lang::XServiceInfo						,
141cdf0e10cSrcweir 				public	css::frame::XFramesSupplier					,	// => XFrame => XComponent
142cdf0e10cSrcweir 				public	css::frame::XDispatchProvider				,
143cdf0e10cSrcweir 				public	css::frame::XDispatchProviderInterception	,
144cdf0e10cSrcweir 				public	css::frame::XDispatchInformationProvider	,
145cdf0e10cSrcweir 				public	css::task::XStatusIndicatorFactory			,
146cdf0e10cSrcweir 				public	css::awt::XWindowListener					,	// => XEventListener
147cdf0e10cSrcweir 				public	css::awt::XTopWindowListener				,
148cdf0e10cSrcweir 				public	css::awt::XFocusListener					,
149cdf0e10cSrcweir                 public  css::document::XActionLockable              ,
150cdf0e10cSrcweir                 public  css::util::XCloseable                       ,   // => XCloseBroadcaster
151cdf0e10cSrcweir                 public  css::frame::XComponentLoader                ,
152cdf0e10cSrcweir                 public  css::frame::XTitle                          ,
153cdf0e10cSrcweir                 public  css::frame::XTitleChangeBroadcaster         ,
154cdf0e10cSrcweir 				// base classes
155cdf0e10cSrcweir 				// Order is neccessary for right initialization of this class!
156cdf0e10cSrcweir                 public  ThreadHelpBase                              ,
157cdf0e10cSrcweir                 public  TransactionBase                             ,
158cdf0e10cSrcweir                 public  PropertySetHelper                           ,   // helper implements ThreadHelpbase, TransactionBase, XPropertySet, XPropertySetInfo
159cdf0e10cSrcweir 				public	::cppu::OWeakObject								// helper implements XInterface, XWeak
160cdf0e10cSrcweir {
161cdf0e10cSrcweir 	//-------------------------------------------------------------------------------------------------------------
162cdf0e10cSrcweir 	//	public methods
163cdf0e10cSrcweir 	//-------------------------------------------------------------------------------------------------------------
164cdf0e10cSrcweir 
165cdf0e10cSrcweir 	public:
166cdf0e10cSrcweir 
167cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
168cdf0e10cSrcweir 		//	constructor / destructor
169cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
170cdf0e10cSrcweir 	 			 Frame( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory	);
171cdf0e10cSrcweir 		virtual	~Frame(																			);
172cdf0e10cSrcweir 
173cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
174cdf0e10cSrcweir 		//	XInterface, XTypeProvider, XServiceInfo
175cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
176cdf0e10cSrcweir 		FWK_DECLARE_XINTERFACE
177cdf0e10cSrcweir 		FWK_DECLARE_XTYPEPROVIDER
178cdf0e10cSrcweir 		DECLARE_XSERVICEINFO
179cdf0e10cSrcweir 
180cdf0e10cSrcweir         //---------------------------------------------------------------------------------------------------------
181cdf0e10cSrcweir         //  XComponentLoader
182cdf0e10cSrcweir         //---------------------------------------------------------------------------------------------------------
183cdf0e10cSrcweir         virtual css::uno::Reference< css::lang::XComponent >        SAL_CALL loadComponentFromURL               ( const ::rtl::OUString&                                                        sURL                ,
184cdf0e10cSrcweir                                                                                                                   const ::rtl::OUString&                                                        sTargetFrameName    ,
185cdf0e10cSrcweir                                                                                                                         sal_Int32                                                               nSearchFlags        ,
186cdf0e10cSrcweir                                                                                                                   const css::uno::Sequence< css::beans::PropertyValue >&                        lArguments          ) throw( css::io::IOException                ,
187cdf0e10cSrcweir                                                                                                                                                                                                                              css::lang::IllegalArgumentException ,
188cdf0e10cSrcweir                                                                                                                                                                                                                              css::uno::RuntimeException          );
189cdf0e10cSrcweir 
190cdf0e10cSrcweir 
191cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
192cdf0e10cSrcweir 		//	XFramesSupplier
193cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
194cdf0e10cSrcweir     	virtual css::uno::Reference< css::frame::XFrames >			SAL_CALL getFrames	  						(																									) throw( css::uno::RuntimeException );
195cdf0e10cSrcweir     	virtual css::uno::Reference< css::frame::XFrame > 			SAL_CALL getActiveFrame						(																									) throw( css::uno::RuntimeException );
196cdf0e10cSrcweir     	virtual void									  			SAL_CALL setActiveFrame						(	const	css::uno::Reference< css::frame::XFrame >&							xFrame				) throw( css::uno::RuntimeException );
197cdf0e10cSrcweir 
198cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
199cdf0e10cSrcweir 		//	XFrame
200cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
201cdf0e10cSrcweir     	virtual void												SAL_CALL initialize							(	const	css::uno::Reference< css::awt::XWindow >&							xWindow				) throw( css::uno::RuntimeException );
202cdf0e10cSrcweir     	virtual css::uno::Reference< css::awt::XWindow >			SAL_CALL getContainerWindow					(																									) throw( css::uno::RuntimeException );
203cdf0e10cSrcweir     	virtual void												SAL_CALL setCreator							(	const	css::uno::Reference< css::frame::XFramesSupplier >&					xCreator			) throw( css::uno::RuntimeException );
204cdf0e10cSrcweir     	virtual css::uno::Reference< css::frame::XFramesSupplier >	SAL_CALL getCreator							(																									) throw( css::uno::RuntimeException );
205cdf0e10cSrcweir     	virtual ::rtl::OUString										SAL_CALL getName							(																									) throw( css::uno::RuntimeException );
206cdf0e10cSrcweir     	virtual void												SAL_CALL setName							(	const	::rtl::OUString&													sName				) throw( css::uno::RuntimeException );
207cdf0e10cSrcweir     	virtual css::uno::Reference< css::frame::XFrame >			SAL_CALL findFrame							(	const	::rtl::OUString&													sTargetFrameName	,
208cdf0e10cSrcweir 																															sal_Int32															nSearchFlags		) throw( css::uno::RuntimeException );
209cdf0e10cSrcweir     	virtual sal_Bool											SAL_CALL isTop								(																									) throw( css::uno::RuntimeException );
210cdf0e10cSrcweir     	virtual void												SAL_CALL activate							(																									) throw( css::uno::RuntimeException );
211cdf0e10cSrcweir     	virtual void												SAL_CALL deactivate							(																									) throw( css::uno::RuntimeException );
212cdf0e10cSrcweir     	virtual sal_Bool											SAL_CALL isActive							(																									) throw( css::uno::RuntimeException );
213cdf0e10cSrcweir     	virtual void												SAL_CALL contextChanged						(																									) throw( css::uno::RuntimeException );
214cdf0e10cSrcweir     	virtual sal_Bool											SAL_CALL setComponent						(	const	css::uno::Reference< css::awt::XWindow >&							xComponentWindow	,
215cdf0e10cSrcweir 																													const	css::uno::Reference< css::frame::XController >&						xController			) throw( css::uno::RuntimeException );
216cdf0e10cSrcweir     	virtual css::uno::Reference< css::awt::XWindow >			SAL_CALL getComponentWindow					(																									) throw( css::uno::RuntimeException );
217cdf0e10cSrcweir     	virtual css::uno::Reference< css::frame::XController >		SAL_CALL getController						(																									) throw( css::uno::RuntimeException );
218cdf0e10cSrcweir     	virtual void												SAL_CALL addFrameActionListener				(	const	css::uno::Reference< css::frame::XFrameActionListener >&			xListener			) throw( css::uno::RuntimeException );
219cdf0e10cSrcweir     	virtual void												SAL_CALL removeFrameActionListener			(	const	css::uno::Reference< css::frame::XFrameActionListener >&			xListener			) throw( css::uno::RuntimeException );
220cdf0e10cSrcweir 
221cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
222cdf0e10cSrcweir 		//	XComponent
223cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
224cdf0e10cSrcweir     	virtual void												SAL_CALL dispose							(																									) throw( css::uno::RuntimeException );
225cdf0e10cSrcweir     	virtual void												SAL_CALL addEventListener					(	const	css::uno::Reference< css::lang::XEventListener >&					xListener			) throw( css::uno::RuntimeException );
226cdf0e10cSrcweir     	virtual void												SAL_CALL removeEventListener				(	const	css::uno::Reference< css::lang::XEventListener >&					xListener			) throw( css::uno::RuntimeException );
227cdf0e10cSrcweir 
228cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
229cdf0e10cSrcweir 		//	XStatusIndicatorFactory
230cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
231cdf0e10cSrcweir 	    virtual css::uno::Reference< css::task::XStatusIndicator >	SAL_CALL createStatusIndicator				(																									) throw( css::uno::RuntimeException );
232cdf0e10cSrcweir 
233cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
234cdf0e10cSrcweir 		//	XDispatchProvider
235cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
236cdf0e10cSrcweir     	virtual css::uno::Reference< css::frame::XDispatch >		SAL_CALL queryDispatch						(	const	css::util::URL&														aURL				,
237cdf0e10cSrcweir 																													const	::rtl::OUString&													sTargetFrameName	,
238cdf0e10cSrcweir 																															sal_Int32															nSearchFlags		) throw( css::uno::RuntimeException );
239cdf0e10cSrcweir     	virtual css::uno::Sequence<
240cdf0e10cSrcweir 					css::uno::Reference< css::frame::XDispatch > >	SAL_CALL queryDispatches					(	const	css::uno::Sequence< css::frame::DispatchDescriptor >&				lDescriptor	   		) throw( css::uno::RuntimeException );
241cdf0e10cSrcweir 
242cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
243cdf0e10cSrcweir 		//	XDispatchProviderInterception
244cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
245cdf0e10cSrcweir     	virtual void												SAL_CALL registerDispatchProviderInterceptor(	const	css::uno::Reference< css::frame::XDispatchProviderInterceptor >&	xInterceptor		) throw( css::uno::RuntimeException );
246cdf0e10cSrcweir     	virtual void												SAL_CALL releaseDispatchProviderInterceptor	(	const	css::uno::Reference< css::frame::XDispatchProviderInterceptor >&	xInterceptor		) throw( css::uno::RuntimeException );
247cdf0e10cSrcweir 
248cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
249cdf0e10cSrcweir 		//	XDispatchInformationProvider
250cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
251cdf0e10cSrcweir         virtual css::uno::Sequence< sal_Int16 >                       SAL_CALL getSupportedCommandGroups         (                       ) throw (css::uno::RuntimeException);
252cdf0e10cSrcweir         virtual css::uno::Sequence< css::frame::DispatchInformation > SAL_CALL getConfigurableDispatchInformation(sal_Int16 nCommandGroup) throw (css::uno::RuntimeException);
253cdf0e10cSrcweir 
254cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
255cdf0e10cSrcweir 		//	XWindowListener
256cdf0e10cSrcweir         //  Attention: windowResized() and windowShown() are implement only! All other are empty!
257cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
258cdf0e10cSrcweir     	virtual void												SAL_CALL windowResized						(	const	css::awt::WindowEvent&												aEvent				) throw( css::uno::RuntimeException );
windowMoved(const css::awt::WindowEvent &)259cdf0e10cSrcweir     	virtual void												SAL_CALL windowMoved						(	const	css::awt::WindowEvent&												/*aEvent*/     		) throw( css::uno::RuntimeException ) {};
260cdf0e10cSrcweir         virtual void                                                SAL_CALL windowShown                        (   const   css::lang::EventObject&                                             aEvent              ) throw( css::uno::RuntimeException );
261cdf0e10cSrcweir         virtual void                                                SAL_CALL windowHidden                       (   const   css::lang::EventObject&                                             aEvent              ) throw( css::uno::RuntimeException );
262cdf0e10cSrcweir 
263cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
264cdf0e10cSrcweir 		//	XFocusListener
265cdf0e10cSrcweir 		//	Attention: focusLost() not implemented yet!
266cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
267cdf0e10cSrcweir 		virtual void												SAL_CALL focusGained						(	const	css::awt::FocusEvent&												aEvent				) throw( css::uno::RuntimeException );
focusLost(const css::awt::FocusEvent &)268cdf0e10cSrcweir     	virtual void												SAL_CALL focusLost							(	const	css::awt::FocusEvent&												/*aEvent*/			) throw( css::uno::RuntimeException ) {};
269cdf0e10cSrcweir 
270cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
271cdf0e10cSrcweir 		//	XTopWindowListener
272cdf0e10cSrcweir         //  Attention: windowActivated(), windowDeactivated() and windowClosing() are implement only! All other are empty!
273cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
274cdf0e10cSrcweir     	virtual void												SAL_CALL windowActivated					(	const	css::lang::EventObject&												aEvent				) throw( css::uno::RuntimeException );
275cdf0e10cSrcweir     	virtual void												SAL_CALL windowDeactivated					(	const	css::lang::EventObject&												aEvent				) throw( css::uno::RuntimeException );
windowOpened(const css::lang::EventObject &)276cdf0e10cSrcweir     	virtual void												SAL_CALL windowOpened						(	const	css::lang::EventObject&												/*aEvent*/			) throw( css::uno::RuntimeException ) {};
277cdf0e10cSrcweir         virtual void                                                SAL_CALL windowClosing                      (   const   css::lang::EventObject&                                             aEvent              ) throw( css::uno::RuntimeException );
windowClosed(const css::lang::EventObject &)278cdf0e10cSrcweir         virtual void                                                SAL_CALL windowClosed                       (   const   css::lang::EventObject&                                             /*aEvent*/          ) throw( css::uno::RuntimeException ) {};
windowMinimized(const css::lang::EventObject &)279cdf0e10cSrcweir     	virtual void												SAL_CALL windowMinimized					(	const	css::lang::EventObject&												/*aEvent*/     		) throw( css::uno::RuntimeException ) {};
windowNormalized(const css::lang::EventObject &)280cdf0e10cSrcweir     	virtual void												SAL_CALL windowNormalized					(	const	css::lang::EventObject&												/*aEvent*/			) throw( css::uno::RuntimeException ) {};
281cdf0e10cSrcweir 
282cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
283cdf0e10cSrcweir         //  XEventListener
284cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
285cdf0e10cSrcweir 	    virtual void												SAL_CALL disposing							(	const	css::lang::EventObject&												aEvent				) throw( css::uno::RuntimeException );
286cdf0e10cSrcweir 
287cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
288cdf0e10cSrcweir         //  XActionLockable
289cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
290cdf0e10cSrcweir         virtual sal_Bool    SAL_CALL isActionLocked  (                 ) throw( css::uno::RuntimeException );
291cdf0e10cSrcweir         virtual void        SAL_CALL addActionLock   (                 ) throw( css::uno::RuntimeException );
292cdf0e10cSrcweir         virtual void        SAL_CALL removeActionLock(                 ) throw( css::uno::RuntimeException );
293cdf0e10cSrcweir         virtual void        SAL_CALL setActionLocks  ( sal_Int16 nLock ) throw( css::uno::RuntimeException );
294cdf0e10cSrcweir         virtual sal_Int16   SAL_CALL resetActionLocks(                 ) throw( css::uno::RuntimeException );
295cdf0e10cSrcweir 
296cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
297cdf0e10cSrcweir         //  XCloseable
298cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
299cdf0e10cSrcweir         virtual void SAL_CALL close( sal_Bool bDeliverOwnerShip ) throw( css::util::CloseVetoException,
300cdf0e10cSrcweir                                                                          css::uno::RuntimeException   );
301cdf0e10cSrcweir 
302cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
303cdf0e10cSrcweir         //  XCloseBroadcaster
304cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
305cdf0e10cSrcweir         virtual void SAL_CALL addCloseListener   ( const css::uno::Reference< css::util::XCloseListener >& xListener ) throw (css::uno::RuntimeException);
306cdf0e10cSrcweir         virtual void SAL_CALL removeCloseListener( const css::uno::Reference< css::util::XCloseListener >& xListener ) throw (css::uno::RuntimeException);
307cdf0e10cSrcweir 
308cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
309cdf0e10cSrcweir         //  XTitle
310cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
311cdf0e10cSrcweir         virtual ::rtl::OUString SAL_CALL getTitle(                               ) throw (css::uno::RuntimeException);
312cdf0e10cSrcweir         virtual void            SAL_CALL setTitle( const ::rtl::OUString& sTitle ) throw (css::uno::RuntimeException);
313cdf0e10cSrcweir 
314cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
315cdf0e10cSrcweir         //  XTitleChangeBroadcaster
316cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
317cdf0e10cSrcweir         virtual void SAL_CALL addTitleChangeListener   ( const css::uno::Reference< css::frame::XTitleChangeListener >& xListener) throw (css::uno::RuntimeException);
318cdf0e10cSrcweir         virtual void SAL_CALL removeTitleChangeListener( const css::uno::Reference< css::frame::XTitleChangeListener >& xListenr ) throw (css::uno::RuntimeException);
319cdf0e10cSrcweir 
320cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
321cdf0e10cSrcweir 		//	PropertySetHelper => XPropertySet, XPropertySetInfo
322cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
323cdf0e10cSrcweir     private:
324cdf0e10cSrcweir 
325cdf0e10cSrcweir         void impl_initializePropInfo();
326cdf0e10cSrcweir 
327cdf0e10cSrcweir         virtual void SAL_CALL impl_setPropertyValue(const ::rtl::OUString& sProperty,
328cdf0e10cSrcweir                                                           sal_Int32        nHandle  ,
329cdf0e10cSrcweir                                                     const css::uno::Any&   aValue   );
330cdf0e10cSrcweir 
331cdf0e10cSrcweir         virtual css::uno::Any SAL_CALL impl_getPropertyValue(const ::rtl::OUString& sProperty,
332cdf0e10cSrcweir                                                                    sal_Int32        nHandle  );
333cdf0e10cSrcweir 
334cdf0e10cSrcweir 	//-------------------------------------------------------------------------------------------------------------
335cdf0e10cSrcweir 	//	private methods
336cdf0e10cSrcweir 	//-------------------------------------------------------------------------------------------------------------
337cdf0e10cSrcweir 
338cdf0e10cSrcweir 	private:
339cdf0e10cSrcweir 
340cdf0e10cSrcweir 		/*-****************************************************************************************************//**
341cdf0e10cSrcweir 			@short		helper methods
342cdf0e10cSrcweir 			@descr		Follow methods are needed at different points of our code (more then ones!).
343cdf0e10cSrcweir 
344cdf0e10cSrcweir             @attention  Threadsafe methods are signed by "implts_..."!
345cdf0e10cSrcweir 		*//*-*****************************************************************************************************/
346cdf0e10cSrcweir 
347cdf0e10cSrcweir         // threadsafe
348cdf0e10cSrcweir         void                                                    implts_sendFrameActionEvent     ( const css::frame::FrameAction&                        aAction          );
349cdf0e10cSrcweir         void                                                    implts_resizeComponentWindow    (                                                                        );
350cdf0e10cSrcweir         void                                                    implts_setIconOnWindow          (                                                                        );
351cdf0e10cSrcweir         void                                                    implts_startWindowListening     (                                                                        );
352cdf0e10cSrcweir         void                                                    implts_stopWindowListening      (                                                                        );
353cdf0e10cSrcweir         void                                                    implts_saveWindowAttributes     (                                                                        );
354cdf0e10cSrcweir         void                                                    implts_checkSuicide             (                                                                        );
355cdf0e10cSrcweir 		void													implts_forgetSubFrames			(																		 );
356cdf0e10cSrcweir         DECL_LINK( implts_windowClosing, void* );
357cdf0e10cSrcweir         css::uno::Reference< css::awt::XTopWindow >             impl_searchTopWindow            ( const css::uno::Reference< css::awt::XWindow >&       xWindow          );
358cdf0e10cSrcweir 
359cdf0e10cSrcweir         // non threadsafe
360cdf0e10cSrcweir         void                                                    impl_checkMenuCloser            (                                                                        );
361cdf0e10cSrcweir         void                                                    impl_setCloser                  ( const css::uno::Reference< css::frame::XFrame >&      xFrame           ,
362cdf0e10cSrcweir                                                                                                         sal_Bool                                        bState           );
363cdf0e10cSrcweir         void                                                    impl_disposeContainerWindow     (       css::uno::Reference< css::awt::XWindow >&       xWindow          );
364cdf0e10cSrcweir         static const css::uno::Sequence< css::beans::Property > impl_getStaticPropertyDescriptor(                                                                        );
365cdf0e10cSrcweir 
366cdf0e10cSrcweir 	//-------------------------------------------------------------------------------------------------------------
367cdf0e10cSrcweir 	//	debug methods
368cdf0e10cSrcweir 	//	(should be private everyway!)
369cdf0e10cSrcweir 	//-------------------------------------------------------------------------------------------------------------
370cdf0e10cSrcweir 
371cdf0e10cSrcweir 		/*-****************************************************************************************************//**
372cdf0e10cSrcweir 			@short		debug-method to check incoming parameter of some other mehods of this class
373cdf0e10cSrcweir 			@descr		The following methods are used to check parameters for other methods
374cdf0e10cSrcweir 						of this class. The return value is used directly for an ASSERT(...).
375cdf0e10cSrcweir 
376cdf0e10cSrcweir 			@attention	This methods are static and can't use our member directly! It's better for threadsafe code...
377cdf0e10cSrcweir 						because we call it with references or pointer to check variables ... and must make it safe
378cdf0e10cSrcweir 						by himself!
379cdf0e10cSrcweir 
380cdf0e10cSrcweir 			@seealso	ASSERTs in implementation!
381cdf0e10cSrcweir 
382cdf0e10cSrcweir 			@param		references to checking variables
383cdf0e10cSrcweir 			@return		sal_True  ,on invalid parameter
384cdf0e10cSrcweir 			@return		sal_False ,otherwise
385cdf0e10cSrcweir 
386cdf0e10cSrcweir 			@onerror	We return sal_True
387cdf0e10cSrcweir 		*//*-*****************************************************************************************************/
388cdf0e10cSrcweir 
389cdf0e10cSrcweir 	#ifdef ENABLE_ASSERTIONS
390cdf0e10cSrcweir 
391cdf0e10cSrcweir 	private:
392cdf0e10cSrcweir 
393cdf0e10cSrcweir         static sal_Bool implcp_ctor                                (   const   css::uno::Reference< css::lang::XMultiServiceFactory >&             xFactory            );
394cdf0e10cSrcweir         static sal_Bool implcp_setActiveFrame                      (   const   css::uno::Reference< css::frame::XFrame >&                          xFrame              );
395cdf0e10cSrcweir         static sal_Bool implcp_addFrameActionListener              (   const   css::uno::Reference< css::frame::XFrameActionListener >&            xListener           );
396cdf0e10cSrcweir         static sal_Bool implcp_removeFrameActionListener           (   const   css::uno::Reference< css::frame::XFrameActionListener >&            xListener           );
397cdf0e10cSrcweir         static sal_Bool implcp_addEventListener                    (   const   css::uno::Reference< css::lang::XEventListener >&                   xListener           );
398cdf0e10cSrcweir         static sal_Bool implcp_removeEventListener                 (   const   css::uno::Reference< css::lang::XEventListener >&                   xListener           );
399cdf0e10cSrcweir         static sal_Bool implcp_windowResized                       (   const   css::awt::WindowEvent&                                              aEvent              );
400cdf0e10cSrcweir         static sal_Bool implcp_focusGained                         (   const   css::awt::FocusEvent&                                               aEvent              );
401cdf0e10cSrcweir         static sal_Bool implcp_windowActivated                     (   const   css::lang::EventObject&                                             aEvent              );
402cdf0e10cSrcweir         static sal_Bool implcp_windowDeactivated                   (   const   css::lang::EventObject&                                             aEvent              );
403cdf0e10cSrcweir         static sal_Bool implcp_disposing                           (   const   css::lang::EventObject&                                             aEvent              );
404cdf0e10cSrcweir 
405cdf0e10cSrcweir 	#endif	// #ifdef ENABLE_ASSERTIONS
406cdf0e10cSrcweir 
407cdf0e10cSrcweir 	//*************************************************************************************************************
408cdf0e10cSrcweir 	//	variables
409cdf0e10cSrcweir 	//	-threadsafe by own read/write lock "m_aLock"
410cdf0e10cSrcweir 	//*************************************************************************************************************
411cdf0e10cSrcweir 	private:
412cdf0e10cSrcweir 
413cdf0e10cSrcweir         css::uno::Reference< css::lang::XMultiServiceFactory >                  m_xFactory                          ;   /// reference to factory, which has create this instance
414cdf0e10cSrcweir         css::uno::Reference< css::task::XStatusIndicatorFactory >               m_xIndicatorFactoryHelper           ;   /// reference to factory helper to create status indicator objects
415cdf0e10cSrcweir         css::uno::WeakReference< css::task::XStatusIndicator >                  m_xIndicatorInterception            ;   /// points to an external set progress, which should be used instead of the internal one.
416cdf0e10cSrcweir         css::uno::Reference< css::frame::XDispatchProvider >                    m_xDispatchHelper                   ;   /// helper for XDispatch/Provider and interception interfaces
417cdf0e10cSrcweir         css::uno::Reference< css::frame::XFrames >                              m_xFramesHelper                     ;   /// helper for XFrames, XIndexAccess and XElementAccess interfaces
418cdf0e10cSrcweir         ::cppu::OMultiTypeInterfaceContainerHelper                              m_aListenerContainer                ;   /// container for ALL Listener
419cdf0e10cSrcweir         css::uno::Reference< css::frame::XFramesSupplier >                      m_xParent                           ;   /// parent of this frame
420cdf0e10cSrcweir         css::uno::Reference< css::awt::XWindow >                                m_xContainerWindow                  ;   /// containerwindow of this frame for embedded components
421cdf0e10cSrcweir         css::uno::Reference< css::awt::XWindow >                                m_xComponentWindow                  ;   /// window of the actual component
422cdf0e10cSrcweir         css::uno::Reference< css::frame::XController >                          m_xController                       ;   /// controller of the actual frame
423cdf0e10cSrcweir         css::uno::Reference< css::datatransfer::dnd::XDropTargetListener >      m_xDropTargetListener               ;   /// listen to drag & drop
424cdf0e10cSrcweir         EActiveState                                                            m_eActiveState                      ;   /// state, if i'am a member of active path in tree or i have the focus or ...
425cdf0e10cSrcweir         ::rtl::OUString                                                         m_sName                             ;   /// name of this frame
426cdf0e10cSrcweir         sal_Bool                                                                m_bIsFrameTop                       ;   /// frame has no parent or the parent is a taskor the desktop
427cdf0e10cSrcweir         sal_Bool                                                                m_bConnected                        ;   /// due to FrameActionEvent
428cdf0e10cSrcweir         sal_Int16                                                               m_nExternalLockCount                ;
429cdf0e10cSrcweir         css::uno::Reference< css::frame::XDispatchRecorderSupplier >            m_xDispatchRecorderSupplier         ;   /// is used for dispatch recording and will be set/get from outside. Frame provide it only!
430cdf0e10cSrcweir         SvtCommandOptions                                                       m_aCommandOptions                   ;   /// ref counted class to support disabling commands defined by configuration file
431cdf0e10cSrcweir         sal_Bool                                                                m_bSelfClose                        ;   /// in case of CloseVetoException on method close() wqs thrown by ourself - we must close ourself later if no internal processes are running
432cdf0e10cSrcweir         sal_Bool                                                                m_bIsHidden                         ;   /// indicates, if this frame is used in hidden mode or not
433cdf0e10cSrcweir         static css::uno::WeakReference< css::frame::XFrame >                    m_xCloserFrame                      ;   /// holds the only frame, which must show the special closer menu item (can be NULL!)
434cdf0e10cSrcweir         css::uno::Reference< ::com::sun::star::frame::XLayoutManager >    m_xLayoutManager                    ;   /// is used to layout the child windows of the frame.
435cdf0e10cSrcweir         css::uno::Reference< css::frame::XDispatchInformationProvider >         m_xDispatchInfoHelper               ;
436cdf0e10cSrcweir         css::uno::Reference< css::frame::XTitle >                               m_xTitleHelper                      ;
437*570f3dc5SHerbert Dürr 	     void*                                                                   mp_WindowCommandDispatch            ;   /// holds the window command dispatch
438cdf0e10cSrcweir 
439cdf0e10cSrcweir     protected:
440cdf0e10cSrcweir 
441cdf0e10cSrcweir         FrameContainer                                                          m_aChildFrameContainer              ;   /// array of child frames
442cdf0e10cSrcweir 
impl_getFactory()443cdf0e10cSrcweir         inline css::uno::Reference< css::lang::XMultiServiceFactory > impl_getFactory()
444cdf0e10cSrcweir         {
445cdf0e10cSrcweir             ReadGuard aReadLock( m_aLock );
446cdf0e10cSrcweir             return m_xFactory;
447cdf0e10cSrcweir         }
448cdf0e10cSrcweir 
impl_getName()449cdf0e10cSrcweir         inline ::rtl::OUString impl_getName()
450cdf0e10cSrcweir         {
451cdf0e10cSrcweir             ReadGuard aReadLock( m_aLock );
452cdf0e10cSrcweir             return m_sName;
453cdf0e10cSrcweir         }
454cdf0e10cSrcweir 
impl_getContainerWindow()455cdf0e10cSrcweir         inline css::uno::Reference< css::awt::XWindow > impl_getContainerWindow()
456cdf0e10cSrcweir         {
457cdf0e10cSrcweir             ReadGuard aReadLock( m_aLock );
458cdf0e10cSrcweir             return m_xContainerWindow;
459cdf0e10cSrcweir         }
460cdf0e10cSrcweir 
impl_getDispatchHelper()461cdf0e10cSrcweir         inline css::uno::Reference< css::frame::XDispatchProvider > impl_getDispatchHelper()
462cdf0e10cSrcweir         {
463cdf0e10cSrcweir             ReadGuard aReadLock( m_aLock );
464cdf0e10cSrcweir             return m_xDispatchHelper;
465cdf0e10cSrcweir         }
466cdf0e10cSrcweir 
impl_getParent()467cdf0e10cSrcweir         inline css::uno::Reference< css::frame::XFramesSupplier > impl_getParent()
468cdf0e10cSrcweir         {
469cdf0e10cSrcweir             ReadGuard aReadLock( m_aLock );
470cdf0e10cSrcweir             return m_xParent;
471cdf0e10cSrcweir         }
472cdf0e10cSrcweir 
473cdf0e10cSrcweir };		// class Frame
474cdf0e10cSrcweir 
475cdf0e10cSrcweir }		// namespace framework
476cdf0e10cSrcweir 
477cdf0e10cSrcweir #endif	// #ifndef __FRAMEWORK_SERVICES_FRAME_HXX_
478