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