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