summaryrefslogtreecommitdiff
path: root/framework/inc/services/frame.hxx
blob: 743de3c08673505c1b26babb45441c3a8225f03a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
/*************************************************************************
 *
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 * 
 * Copyright 2008 by Sun Microsystems, Inc.
 *
 * OpenOffice.org - a multi-platform office productivity suite
 *
 * $RCSfile: frame.hxx,v $
 *
 * $Revision: 1.41.82.1 $
 *
 * This file is part of OpenOffice.org.
 *
 * OpenOffice.org is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License version 3
 * only, as published by the Free Software Foundation.
 *
 * OpenOffice.org is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License version 3 for more details
 * (a copy is included in the LICENSE file that accompanied this code).
 *
 * You should have received a copy of the GNU Lesser General Public License
 * version 3 along with OpenOffice.org.  If not, see
 * <http://www.openoffice.org/license.html>
 * for a copy of the LGPLv3 License.
 *
 ************************************************************************/

#ifndef __FRAMEWORK_SERVICES_FRAME_HXX_
#define __FRAMEWORK_SERVICES_FRAME_HXX_

//_________________________________________________________________________________________________________________
//	my own includes
//_________________________________________________________________________________________________________________

#include <classes/framecontainer.hxx>
#include <classes/propertysethelper.hxx>
#include <threadhelp/resetableguard.hxx>
#include <threadhelp/writeguard.hxx>
#include <threadhelp/readguard.hxx>
#include <threadhelp/threadhelpbase.hxx>

#ifndef __FRAMEWORK_THREADHELP_TRANSACTIONBASE_HXX_
#include <threadhelp/transactionbase.hxx>
#endif
#include <macros/generic.hxx>
#include <macros/debug.hxx>
#include <macros/xinterface.hxx>
#include <macros/xtypeprovider.hxx>
#include <macros/xserviceinfo.hxx>
#include <general.h>

//_________________________________________________________________________________________________________________
//	interface includes
//_________________________________________________________________________________________________________________
#include <com/sun/star/frame/XDispatchInformationProvider.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/frame/XDispatch.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/frame/XDispatchRecorderSupplier.hpp>
#include <com/sun/star/frame/XDispatchProviderInterception.hpp>
#include <com/sun/star/frame/XDispatchProviderInterceptor.hpp>
#include <com/sun/star/lang/XEventListener.hpp>
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/frame/XFrameActionListener.hpp>
#include <com/sun/star/frame/XFrames.hpp>
#include <com/sun/star/frame/XFramesSupplier.hpp>
#include <com/sun/star/frame/XTitle.hpp>
#include <com/sun/star/frame/XTitleChangeBroadcaster.hpp>
#include <com/sun/star/task/XStatusIndicator.hpp>
#include <com/sun/star/task/XStatusIndicatorFactory.hpp>
#include <com/sun/star/awt/XTopWindowListener.hpp>
#include <com/sun/star/awt/XWindow.hpp>
#include <com/sun/star/awt/XTopWindow.hpp>
#include <com/sun/star/awt/XWindowListener.hpp>
#include <com/sun/star/awt/XFocusListener.hpp>
#include <com/sun/star/awt/FocusEvent.hpp>
#include <com/sun/star/datatransfer/dnd/XDropTargetListener.hpp>
#include <com/sun/star/document/XActionLockable.hpp>
#include <com/sun/star/util/XCloseable.hpp>
#include <com/sun/star/frame/XLayoutManager.hpp>

//_________________________________________________________________________________________________________________
//	other includes
//_________________________________________________________________________________________________________________
#include <svtools/cmdoptions.hxx>
#include <cppuhelper/interfacecontainer.hxx>
#include <cppuhelper/weak.hxx>
#include <rtl/string.hxx>

//_________________________________________________________________________________________________________________
//	namespace
//_________________________________________________________________________________________________________________

namespace framework{

//_________________________________________________________________________________________________________________
//	exported const
//_________________________________________________________________________________________________________________

// This enum can be used to set differnt active states of frames
enum EActiveState
{
    E_INACTIVE		,	// I'am not a member of active path in tree and i don't have the focus.
    E_ACTIVE		,	// I'am in the middle of an active path in tree and i don't have the focus.
    E_FOCUS				// I have the focus now. I must a member of an active path!
};

//_________________________________________________________________________________________________________________
//	exported definitions
//_________________________________________________________________________________________________________________

/*-************************************************************************************************************//**
    @short		implements a normal frame of hierarchy
    @descr      An instance of these class can be a normal node in frame tree. A frame support influencing of his
                subtree, find of subframes, activate- and deactivate-mechanism as well as
                set/get of a frame window, component or controller.

    @attention	This implementation supports three states: a)uninitialized, b)working, c)disposed
                If you call wrong methods in modes a) or c) ... you will get some exceptions.
                How you should work with this service:
                    i) 		create it by using "xServiceManager->createInstance(...)"
                    ii)		call XInitialization::initialize() with a valid window reference or use createInstanceWithArguments() at i)
                    iii)	works with object
                    iv)		dispose object by calling XComponent::dispose()
                After iv) all further requests are rejected by exceptions! (DisposedException)

    @base       ThreadHelpBase
                    help to guarantee correct initialized lock member at startup
    @base       TransactionBase
                    help to implement unbreakable interface calls
    @base       OBroadcastHelper
                OPropertySetHelper
                    implements the property set
    @base       OWeakObject
                    provides the refcount and XInterface, XWeak

    @devstatus	ready to use
    @threadsafe	yes
    @modified   04.10.2004 10:47, as96863
*//*-*************************************************************************************************************/
class Frame	:	// interfaces
                public	css::lang::XTypeProvider					,
                public	css::lang::XServiceInfo						,
                public	css::frame::XFramesSupplier					,	// => XFrame => XComponent
                public	css::frame::XDispatchProvider				,
                public	css::frame::XDispatchProviderInterception	,
                public	css::frame::XDispatchInformationProvider	,
                public	css::task::XStatusIndicatorFactory			,
                public	css::awt::XWindowListener					,	// => XEventListener
                public	css::awt::XTopWindowListener				,
                public	css::awt::XFocusListener					,
                public  css::document::XActionLockable              ,
                public  css::util::XCloseable                       ,   // => XCloseBroadcaster
                public  css::frame::XComponentLoader                ,
                public  css::frame::XTitle                          ,
                public  css::frame::XTitleChangeBroadcaster         ,
                // base classes
                // Order is neccessary for right initialization of this class!
                public  ThreadHelpBase                              ,
                public  TransactionBase                             ,
                public  PropertySetHelper                           ,   // helper implements ThreadHelpbase, TransactionBase, XPropertySet, XPropertySetInfo
                public	::cppu::OWeakObject								// helper implements XInterface, XWeak
{
    //-------------------------------------------------------------------------------------------------------------
    //	public methods
    //-------------------------------------------------------------------------------------------------------------

    public:

        //---------------------------------------------------------------------------------------------------------
        //	constructor / destructor
        //---------------------------------------------------------------------------------------------------------
                  Frame( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory	);
        virtual	~Frame(																			);

        //---------------------------------------------------------------------------------------------------------
        //	XInterface, XTypeProvider, XServiceInfo
        //---------------------------------------------------------------------------------------------------------
        FWK_DECLARE_XINTERFACE
        FWK_DECLARE_XTYPEPROVIDER
        DECLARE_XSERVICEINFO

        //---------------------------------------------------------------------------------------------------------
        //  XComponentLoader
        //---------------------------------------------------------------------------------------------------------
        virtual css::uno::Reference< css::lang::XComponent >        SAL_CALL loadComponentFromURL               ( const ::rtl::OUString&                                                        sURL                ,
                                                                                                                  const ::rtl::OUString&                                                        sTargetFrameName    ,
                                                                                                                        sal_Int32                                                               nSearchFlags        ,
                                                                                                                  const css::uno::Sequence< css::beans::PropertyValue >&                        lArguments          ) throw( css::io::IOException                ,
                                                                                                                                                                                                                             css::lang::IllegalArgumentException ,
                                                                                                                                                                                                                             css::uno::RuntimeException          );


        //---------------------------------------------------------------------------------------------------------
        //	XFramesSupplier
        //---------------------------------------------------------------------------------------------------------
        virtual css::uno::Reference< css::frame::XFrames >			SAL_CALL getFrames	  						(																									) throw( css::uno::RuntimeException );
        virtual css::uno::Reference< css::frame::XFrame > 			SAL_CALL getActiveFrame						(																									) throw( css::uno::RuntimeException );
        virtual void									  			SAL_CALL setActiveFrame						(	const	css::uno::Reference< css::frame::XFrame >&							xFrame				) throw( css::uno::RuntimeException );

        //---------------------------------------------------------------------------------------------------------
        //	XFrame
        //---------------------------------------------------------------------------------------------------------
        virtual void												SAL_CALL initialize							(	const	css::uno::Reference< css::awt::XWindow >&							xWindow				) throw( css::uno::RuntimeException );
        virtual css::uno::Reference< css::awt::XWindow >			SAL_CALL getContainerWindow					(																									) throw( css::uno::RuntimeException );
        virtual void												SAL_CALL setCreator							(	const	css::uno::Reference< css::frame::XFramesSupplier >&					xCreator			) throw( css::uno::RuntimeException );
        virtual css::uno::Reference< css::frame::XFramesSupplier >	SAL_CALL getCreator							(																									) throw( css::uno::RuntimeException );
        virtual ::rtl::OUString										SAL_CALL getName							(																									) throw( css::uno::RuntimeException );
        virtual void												SAL_CALL setName							(	const	::rtl::OUString&													sName				) throw( css::uno::RuntimeException );
        virtual css::uno::Reference< css::frame::XFrame >			SAL_CALL findFrame							(	const	::rtl::OUString&													sTargetFrameName	,
                                                                                                                            sal_Int32															nSearchFlags		) throw( css::uno::RuntimeException );
        virtual sal_Bool											SAL_CALL isTop								(																									) throw( css::uno::RuntimeException );
        virtual void												SAL_CALL activate							(																									) throw( css::uno::RuntimeException );
        virtual void												SAL_CALL deactivate							(																									) throw( css::uno::RuntimeException );
        virtual sal_Bool											SAL_CALL isActive							(																									) throw( css::uno::RuntimeException );
        virtual void												SAL_CALL contextChanged						(																									) throw( css::uno::RuntimeException );
        virtual sal_Bool											SAL_CALL setComponent						(	const	css::uno::Reference< css::awt::XWindow >&							xComponentWindow	,
                                                                                                                    const	css::uno::Reference< css::frame::XController >&						xController			) throw( css::uno::RuntimeException );
        virtual css::uno::Reference< css::awt::XWindow >			SAL_CALL getComponentWindow					(																									) throw( css::uno::RuntimeException );
        virtual css::uno::Reference< css::frame::XController >		SAL_CALL getController						(																									) throw( css::uno::RuntimeException );
        virtual void												SAL_CALL addFrameActionListener				(	const	css::uno::Reference< css::frame::XFrameActionListener >&			xListener			) throw( css::uno::RuntimeException );
        virtual void												SAL_CALL removeFrameActionListener			(	const	css::uno::Reference< css::frame::XFrameActionListener >&			xListener			) throw( css::uno::RuntimeException );

        //---------------------------------------------------------------------------------------------------------
        //	XComponent
        //---------------------------------------------------------------------------------------------------------
        virtual void												SAL_CALL dispose							(																									) throw( css::uno::RuntimeException );
        virtual void												SAL_CALL addEventListener					(	const	css::uno::Reference< css::lang::XEventListener >&					xListener			) throw( css::uno::RuntimeException );
        virtual void												SAL_CALL removeEventListener				(	const	css::uno::Reference< css::lang::XEventListener >&					xListener			) throw( css::uno::RuntimeException );

        //---------------------------------------------------------------------------------------------------------
        //	XStatusIndicatorFactory
        //---------------------------------------------------------------------------------------------------------
        virtual css::uno::Reference< css::task::XStatusIndicator >	SAL_CALL createStatusIndicator				(																									) throw( css::uno::RuntimeException );

        //---------------------------------------------------------------------------------------------------------
        //	XDispatchProvider
        //---------------------------------------------------------------------------------------------------------
        virtual css::uno::Reference< css::frame::XDispatch >		SAL_CALL queryDispatch						(	const	css::util::URL&														aURL				,
                                                                                                                    const	::rtl::OUString&													sTargetFrameName	,
                                                                                                                            sal_Int32															nSearchFlags		) throw( css::uno::RuntimeException );
        virtual css::uno::Sequence<
                    css::uno::Reference< css::frame::XDispatch > >	SAL_CALL queryDispatches					(	const	css::uno::Sequence< css::frame::DispatchDescriptor >&				lDescriptor	   		) throw( css::uno::RuntimeException );

        //---------------------------------------------------------------------------------------------------------
        //	XDispatchProviderInterception
        //---------------------------------------------------------------------------------------------------------
        virtual void												SAL_CALL registerDispatchProviderInterceptor(	const	css::uno::Reference< css::frame::XDispatchProviderInterceptor >&	xInterceptor		) throw( css::uno::RuntimeException );
        virtual void												SAL_CALL releaseDispatchProviderInterceptor	(	const	css::uno::Reference< css::frame::XDispatchProviderInterceptor >&	xInterceptor		) throw( css::uno::RuntimeException );

        //---------------------------------------------------------------------------------------------------------
        //	XDispatchInformationProvider
        //---------------------------------------------------------------------------------------------------------
        virtual css::uno::Sequence< sal_Int16 >                       SAL_CALL getSupportedCommandGroups         (                       ) throw (css::uno::RuntimeException);
        virtual css::uno::Sequence< css::frame::DispatchInformation > SAL_CALL getConfigurableDispatchInformation(sal_Int16 nCommandGroup) throw (css::uno::RuntimeException);

        //---------------------------------------------------------------------------------------------------------
        //	XWindowListener
        //  Attention: windowResized() and windowShown() are implement only! All other are empty!
        //---------------------------------------------------------------------------------------------------------
        virtual void												SAL_CALL windowResized						(	const	css::awt::WindowEvent&												aEvent				) throw( css::uno::RuntimeException );
        virtual void												SAL_CALL windowMoved						(	const	css::awt::WindowEvent&												/*aEvent*/     		) throw( css::uno::RuntimeException ) {};
        virtual void                                                SAL_CALL windowShown                        (   const   css::lang::EventObject&                                             aEvent              ) throw( css::uno::RuntimeException );
        virtual void                                                SAL_CALL windowHidden                       (   const   css::lang::EventObject&                                             aEvent              ) throw( css::uno::RuntimeException );

        //---------------------------------------------------------------------------------------------------------
        //	XFocusListener
        //	Attention: focusLost() not implemented yet!
        //---------------------------------------------------------------------------------------------------------
        virtual void												SAL_CALL focusGained						(	const	css::awt::FocusEvent&												aEvent				) throw( css::uno::RuntimeException );
        virtual void												SAL_CALL focusLost							(	const	css::awt::FocusEvent&												/*aEvent*/			) throw( css::uno::RuntimeException ) {};

        //---------------------------------------------------------------------------------------------------------
        //	XTopWindowListener
        //  Attention: windowActivated(), windowDeactivated() and windowClosing() are implement only! All other are empty!
        //---------------------------------------------------------------------------------------------------------
        virtual void												SAL_CALL windowActivated					(	const	css::lang::EventObject&												aEvent				) throw( css::uno::RuntimeException );
        virtual void												SAL_CALL windowDeactivated					(	const	css::lang::EventObject&												aEvent				) throw( css::uno::RuntimeException );
        virtual void												SAL_CALL windowOpened						(	const	css::lang::EventObject&												/*aEvent*/			) throw( css::uno::RuntimeException ) {};
        virtual void                                                SAL_CALL windowClosing                      (   const   css::lang::EventObject&                                             aEvent              ) throw( css::uno::RuntimeException );
        virtual void                                                SAL_CALL windowClosed                       (   const   css::lang::EventObject&                                             /*aEvent*/          ) throw( css::uno::RuntimeException ) {};
        virtual void												SAL_CALL windowMinimized					(	const	css::lang::EventObject&												/*aEvent*/     		) throw( css::uno::RuntimeException ) {};
        virtual void												SAL_CALL windowNormalized					(	const	css::lang::EventObject&												/*aEvent*/			) throw( css::uno::RuntimeException ) {};

        //---------------------------------------------------------------------------------------------------------
        //  XEventListener
        //---------------------------------------------------------------------------------------------------------
        virtual void												SAL_CALL disposing							(	const	css::lang::EventObject&												aEvent				) throw( css::uno::RuntimeException );

        //---------------------------------------------------------------------------------------------------------
        //  XActionLockable
        //---------------------------------------------------------------------------------------------------------
        virtual sal_Bool    SAL_CALL isActionLocked  (                 ) throw( css::uno::RuntimeException );
        virtual void        SAL_CALL addActionLock   (                 ) throw( css::uno::RuntimeException );
        virtual void        SAL_CALL removeActionLock(                 ) throw( css::uno::RuntimeException );
        virtual void        SAL_CALL setActionLocks  ( sal_Int16 nLock ) throw( css::uno::RuntimeException );
        virtual sal_Int16   SAL_CALL resetActionLocks(                 ) throw( css::uno::RuntimeException );

        //---------------------------------------------------------------------------------------------------------
        //  XCloseable
        //---------------------------------------------------------------------------------------------------------
        virtual void SAL_CALL close( sal_Bool bDeliverOwnerShip ) throw( css::util::CloseVetoException,
                                                                         css::uno::RuntimeException   );

        //---------------------------------------------------------------------------------------------------------
        //  XCloseBroadcaster
        //---------------------------------------------------------------------------------------------------------
        virtual void SAL_CALL addCloseListener   ( const css::uno::Reference< css::util::XCloseListener >& xListener ) throw (css::uno::RuntimeException);
        virtual void SAL_CALL removeCloseListener( const css::uno::Reference< css::util::XCloseListener >& xListener ) throw (css::uno::RuntimeException);

        //---------------------------------------------------------------------------------------------------------
        //  XTitle
        //---------------------------------------------------------------------------------------------------------
        virtual ::rtl::OUString SAL_CALL getTitle(                               ) throw (css::uno::RuntimeException);
        virtual void            SAL_CALL setTitle( const ::rtl::OUString& sTitle ) throw (css::uno::RuntimeException);
        
        //---------------------------------------------------------------------------------------------------------
        //  XTitleChangeBroadcaster
        //---------------------------------------------------------------------------------------------------------
        virtual void SAL_CALL addTitleChangeListener   ( const css::uno::Reference< css::frame::XTitleChangeListener >& xListener) throw (css::uno::RuntimeException);
        virtual void SAL_CALL removeTitleChangeListener( const css::uno::Reference< css::frame::XTitleChangeListener >& xListenr ) throw (css::uno::RuntimeException);
        
        //---------------------------------------------------------------------------------------------------------
        //	PropertySetHelper => XPropertySet, XPropertySetInfo
        //---------------------------------------------------------------------------------------------------------
    private:

        void impl_initializePropInfo();

        virtual void SAL_CALL impl_setPropertyValue(const ::rtl::OUString& sProperty,
                                                          sal_Int32        nHandle  ,
                                                    const css::uno::Any&   aValue   );

        virtual css::uno::Any SAL_CALL impl_getPropertyValue(const ::rtl::OUString& sProperty,
                                                                   sal_Int32        nHandle  );

    //-------------------------------------------------------------------------------------------------------------
    //	private methods
    //-------------------------------------------------------------------------------------------------------------

    private:

        /*-****************************************************************************************************//**
            @short		helper methods
            @descr		Follow methods are needed at different points of our code (more then ones!).

            @attention  Threadsafe methods are signed by "implts_..."!
        *//*-*****************************************************************************************************/

        // threadsafe
        void                                                    implts_sendFrameActionEvent     ( const css::frame::FrameAction&                        aAction          );
        void                                                    implts_resizeComponentWindow    (                                                                        );
        void                                                    implts_setIconOnWindow          (                                                                        );
        void                                                    implts_startWindowListening     (                                                                        );
        void                                                    implts_stopWindowListening      (                                                                        );
        void                                                    implts_saveWindowAttributes     (                                                                        );
        void                                                    implts_checkSuicide             (                                                                        );
        void													implts_forgetSubFrames			(																		 );
        DECL_LINK( implts_windowClosing, void* );
        css::uno::Reference< css::awt::XTopWindow >             impl_searchTopWindow            ( const css::uno::Reference< css::awt::XWindow >&       xWindow          );

        // non threadsafe
        void                                                    impl_checkMenuCloser            (                                                                        );
        void                                                    impl_setCloser                  ( const css::uno::Reference< css::frame::XFrame >&      xFrame           ,
                                                                                                        sal_Bool                                        bState           );
        void                                                    impl_disposeContainerWindow     (       css::uno::Reference< css::awt::XWindow >&       xWindow          );
        static const css::uno::Sequence< css::beans::Property > impl_getStaticPropertyDescriptor(                                                                        );

    //-------------------------------------------------------------------------------------------------------------
    //	debug methods
    //	(should be private everyway!)
    //-------------------------------------------------------------------------------------------------------------

        /*-****************************************************************************************************//**
            @short		debug-method to check incoming parameter of some other mehods of this class
            @descr		The following methods are used to check parameters for other methods
                        of this class. The return value is used directly for an ASSERT(...).

            @attention	This methods are static and can't use our member directly! It's better for threadsafe code...
                        because we call it with references or pointer to check variables ... and must make it safe
                        by himself!

            @seealso	ASSERTs in implementation!

            @param		references to checking variables
            @return		sal_True  ,on invalid parameter
            @return		sal_False ,otherwise

            @onerror	We return sal_True
        *//*-*****************************************************************************************************/

    #ifdef ENABLE_ASSERTIONS

    private:

        static sal_Bool implcp_ctor                                (   const   css::uno::Reference< css::lang::XMultiServiceFactory >&             xFactory            );
        static sal_Bool implcp_setActiveFrame                      (   const   css::uno::Reference< css::frame::XFrame >&                          xFrame              );
        static sal_Bool implcp_initialize                          (   const   css::uno::Reference< css::awt::XWindow >&                           xWindow             );
        static sal_Bool implcp_setCreator                          (   const   css::uno::Reference< css::frame::XFramesSupplier >&                 xCreator            );
        static sal_Bool implcp_setName                             (   const   ::rtl::OUString&                                                    sName               );
        static sal_Bool implcp_findFrame                           (   const   ::rtl::OUString&                                                    sTargetFrameName    ,
                                                                               sal_Int32                                                           nSearchFlags        );
        static sal_Bool implcp_setComponent                        (   const   css::uno::Reference< css::awt::XWindow >&                           xComponentWindow    ,
                                                                       const   css::uno::Reference< css::frame::XController >&                     xController         );
        static sal_Bool implcp_addFrameActionListener              (   const   css::uno::Reference< css::frame::XFrameActionListener >&            xListener           );
        static sal_Bool implcp_removeFrameActionListener           (   const   css::uno::Reference< css::frame::XFrameActionListener >&            xListener           );
        static sal_Bool implcp_addEventListener                    (   const   css::uno::Reference< css::lang::XEventListener >&                   xListener           );
        static sal_Bool implcp_removeEventListener                 (   const   css::uno::Reference< css::lang::XEventListener >&                   xListener           );
        static sal_Bool implcp_windowResized                       (   const   css::awt::WindowEvent&                                              aEvent              );
        static sal_Bool implcp_focusGained                         (   const   css::awt::FocusEvent&                                               aEvent              );
        static sal_Bool implcp_windowActivated                     (   const   css::lang::EventObject&                                             aEvent              );
        static sal_Bool implcp_windowDeactivated                   (   const   css::lang::EventObject&                                             aEvent              );
        static sal_Bool implcp_disposing                           (   const   css::lang::EventObject&                                             aEvent              );

    #endif	// #ifdef ENABLE_ASSERTIONS

    //*************************************************************************************************************
    //	variables
    //	-threadsafe by own read/write lock "m_aLock"
    //*************************************************************************************************************
    private:

        css::uno::Reference< css::lang::XMultiServiceFactory >                  m_xFactory                          ;   /// reference to factory, which has create this instance
        css::uno::Reference< css::task::XStatusIndicatorFactory >               m_xIndicatorFactoryHelper           ;   /// reference to factory helper to create status indicator objects
        css::uno::WeakReference< css::task::XStatusIndicator >                  m_xIndicatorInterception            ;   /// points to an external set progress, which should be used instead of the internal one.
        css::uno::Reference< css::frame::XDispatchProvider >                    m_xDispatchHelper                   ;   /// helper for XDispatch/Provider and interception interfaces
        css::uno::Reference< css::frame::XFrames >                              m_xFramesHelper                     ;   /// helper for XFrames, XIndexAccess and XElementAccess interfaces
        ::cppu::OMultiTypeInterfaceContainerHelper                              m_aListenerContainer                ;   /// container for ALL Listener
        css::uno::Reference< css::frame::XFramesSupplier >                      m_xParent                           ;   /// parent of this frame
        css::uno::Reference< css::awt::XWindow >                                m_xContainerWindow                  ;   /// containerwindow of this frame for embedded components
        css::uno::Reference< css::awt::XWindow >                                m_xComponentWindow                  ;   /// window of the actual component
        css::uno::Reference< css::frame::XController >                          m_xController                       ;   /// controller of the actual frame
        css::uno::Reference< css::datatransfer::dnd::XDropTargetListener >      m_xDropTargetListener               ;   /// listen to drag & drop
        EActiveState                                                            m_eActiveState                      ;   /// state, if i'am a member of active path in tree or i have the focus or ...
        ::rtl::OUString                                                         m_sName                             ;   /// name of this frame
        sal_Bool                                                                m_bIsFrameTop                       ;   /// frame has no parent or the parent is a taskor the desktop
        sal_Bool                                                                m_bConnected                        ;   /// due to FrameActionEvent
        sal_Int16                                                               m_nExternalLockCount                ;
        css::uno::Reference< css::frame::XDispatchRecorderSupplier >            m_xDispatchRecorderSupplier         ;   /// is used for dispatch recording and will be set/get from outside. Frame provide it only!
        SvtCommandOptions                                                       m_aCommandOptions                   ;   /// ref counted class to support disabling commands defined by configuration file
        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
        sal_Bool                                                                m_bIsHidden                         ;   /// indicates, if this frame is used in hidden mode or not
        static css::uno::WeakReference< css::frame::XFrame >                    m_xCloserFrame                      ;   /// holds the only frame, which must show the special closer menu item (can be NULL!)
        css::uno::Reference< ::com::sun::star::frame::XLayoutManager >    m_xLayoutManager                    ;   /// is used to layout the child windows of the frame.
        css::uno::Reference< css::frame::XDispatchInformationProvider >         m_xDispatchInfoHelper               ;
        css::uno::Reference< css::frame::XTitle >                               m_xTitleHelper                      ;

    protected:

        FrameContainer                                                          m_aChildFrameContainer              ;   /// array of child frames

        inline css::uno::Reference< css::lang::XMultiServiceFactory > impl_getFactory()
        {
            ReadGuard aReadLock( m_aLock );
            return m_xFactory;
        }

        inline ::rtl::OUString impl_getName()
        {
            ReadGuard aReadLock( m_aLock );
            return m_sName;
        }

        inline css::uno::Reference< css::awt::XWindow > impl_getContainerWindow()
        {
            ReadGuard aReadLock( m_aLock );
            return m_xContainerWindow;
        }

        inline css::uno::Reference< css::frame::XDispatchProvider > impl_getDispatchHelper()
        {
            ReadGuard aReadLock( m_aLock );
            return m_xDispatchHelper;
        }

        inline css::uno::Reference< css::frame::XFramesSupplier > impl_getParent()
        {
            ReadGuard aReadLock( m_aLock );
            return m_xParent;
        }

};		// class Frame

}		// namespace framework

#endif	// #ifndef __FRAMEWORK_SERVICES_FRAME_HXX_