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