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 differnt 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 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 these 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) works 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 neccessary 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 ) throw( css::io::IOException , 187 css::lang::IllegalArgumentException , 188 css::uno::RuntimeException ); 189 190 191 //--------------------------------------------------------------------------------------------------------- 192 // XFramesSupplier 193 //--------------------------------------------------------------------------------------------------------- 194 virtual css::uno::Reference< css::frame::XFrames > SAL_CALL getFrames ( ) throw( css::uno::RuntimeException ); 195 virtual css::uno::Reference< css::frame::XFrame > SAL_CALL getActiveFrame ( ) throw( css::uno::RuntimeException ); 196 virtual void SAL_CALL setActiveFrame ( const css::uno::Reference< css::frame::XFrame >& xFrame ) throw( css::uno::RuntimeException ); 197 198 //--------------------------------------------------------------------------------------------------------- 199 // XFrame 200 //--------------------------------------------------------------------------------------------------------- 201 virtual void SAL_CALL initialize ( const css::uno::Reference< css::awt::XWindow >& xWindow ) throw( css::uno::RuntimeException ); 202 virtual css::uno::Reference< css::awt::XWindow > SAL_CALL getContainerWindow ( ) throw( css::uno::RuntimeException ); 203 virtual void SAL_CALL setCreator ( const css::uno::Reference< css::frame::XFramesSupplier >& xCreator ) throw( css::uno::RuntimeException ); 204 virtual css::uno::Reference< css::frame::XFramesSupplier > SAL_CALL getCreator ( ) throw( css::uno::RuntimeException ); 205 virtual ::rtl::OUString SAL_CALL getName ( ) throw( css::uno::RuntimeException ); 206 virtual void SAL_CALL setName ( const ::rtl::OUString& sName ) throw( css::uno::RuntimeException ); 207 virtual css::uno::Reference< css::frame::XFrame > SAL_CALL findFrame ( const ::rtl::OUString& sTargetFrameName , 208 sal_Int32 nSearchFlags ) throw( css::uno::RuntimeException ); 209 virtual sal_Bool SAL_CALL isTop ( ) throw( css::uno::RuntimeException ); 210 virtual void SAL_CALL activate ( ) throw( css::uno::RuntimeException ); 211 virtual void SAL_CALL deactivate ( ) throw( css::uno::RuntimeException ); 212 virtual sal_Bool SAL_CALL isActive ( ) throw( css::uno::RuntimeException ); 213 virtual void SAL_CALL contextChanged ( ) throw( css::uno::RuntimeException ); 214 virtual sal_Bool SAL_CALL setComponent ( const css::uno::Reference< css::awt::XWindow >& xComponentWindow , 215 const css::uno::Reference< css::frame::XController >& xController ) throw( css::uno::RuntimeException ); 216 virtual css::uno::Reference< css::awt::XWindow > SAL_CALL getComponentWindow ( ) throw( css::uno::RuntimeException ); 217 virtual css::uno::Reference< css::frame::XController > SAL_CALL getController ( ) throw( css::uno::RuntimeException ); 218 virtual void SAL_CALL addFrameActionListener ( const css::uno::Reference< css::frame::XFrameActionListener >& xListener ) throw( css::uno::RuntimeException ); 219 virtual void SAL_CALL removeFrameActionListener ( const css::uno::Reference< css::frame::XFrameActionListener >& xListener ) throw( css::uno::RuntimeException ); 220 221 //--------------------------------------------------------------------------------------------------------- 222 // XComponent 223 //--------------------------------------------------------------------------------------------------------- 224 virtual void SAL_CALL dispose ( ) throw( css::uno::RuntimeException ); 225 virtual void SAL_CALL addEventListener ( const css::uno::Reference< css::lang::XEventListener >& xListener ) throw( css::uno::RuntimeException ); 226 virtual void SAL_CALL removeEventListener ( const css::uno::Reference< css::lang::XEventListener >& xListener ) throw( css::uno::RuntimeException ); 227 228 //--------------------------------------------------------------------------------------------------------- 229 // XStatusIndicatorFactory 230 //--------------------------------------------------------------------------------------------------------- 231 virtual css::uno::Reference< css::task::XStatusIndicator > SAL_CALL createStatusIndicator ( ) throw( css::uno::RuntimeException ); 232 233 //--------------------------------------------------------------------------------------------------------- 234 // XDispatchProvider 235 //--------------------------------------------------------------------------------------------------------- 236 virtual css::uno::Reference< css::frame::XDispatch > SAL_CALL queryDispatch ( const css::util::URL& aURL , 237 const ::rtl::OUString& sTargetFrameName , 238 sal_Int32 nSearchFlags ) throw( css::uno::RuntimeException ); 239 virtual css::uno::Sequence< 240 css::uno::Reference< css::frame::XDispatch > > SAL_CALL queryDispatches ( const css::uno::Sequence< css::frame::DispatchDescriptor >& lDescriptor ) throw( css::uno::RuntimeException ); 241 242 //--------------------------------------------------------------------------------------------------------- 243 // XDispatchProviderInterception 244 //--------------------------------------------------------------------------------------------------------- 245 virtual void SAL_CALL registerDispatchProviderInterceptor( const css::uno::Reference< css::frame::XDispatchProviderInterceptor >& xInterceptor ) throw( css::uno::RuntimeException ); 246 virtual void SAL_CALL releaseDispatchProviderInterceptor ( const css::uno::Reference< css::frame::XDispatchProviderInterceptor >& xInterceptor ) throw( css::uno::RuntimeException ); 247 248 //--------------------------------------------------------------------------------------------------------- 249 // XDispatchInformationProvider 250 //--------------------------------------------------------------------------------------------------------- 251 virtual css::uno::Sequence< sal_Int16 > SAL_CALL getSupportedCommandGroups ( ) throw (css::uno::RuntimeException); 252 virtual css::uno::Sequence< css::frame::DispatchInformation > SAL_CALL getConfigurableDispatchInformation(sal_Int16 nCommandGroup) throw (css::uno::RuntimeException); 253 254 //--------------------------------------------------------------------------------------------------------- 255 // XWindowListener 256 // Attention: windowResized() and windowShown() are implement only! All other are empty! 257 //--------------------------------------------------------------------------------------------------------- 258 virtual void SAL_CALL windowResized ( const css::awt::WindowEvent& aEvent ) throw( css::uno::RuntimeException ); 259 virtual void SAL_CALL windowMoved ( const css::awt::WindowEvent& /*aEvent*/ ) throw( css::uno::RuntimeException ) {}; 260 virtual void SAL_CALL windowShown ( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ); 261 virtual void SAL_CALL windowHidden ( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ); 262 263 //--------------------------------------------------------------------------------------------------------- 264 // XFocusListener 265 // Attention: focusLost() not implemented yet! 266 //--------------------------------------------------------------------------------------------------------- 267 virtual void SAL_CALL focusGained ( const css::awt::FocusEvent& aEvent ) throw( css::uno::RuntimeException ); 268 virtual void SAL_CALL focusLost ( const css::awt::FocusEvent& /*aEvent*/ ) throw( css::uno::RuntimeException ) {}; 269 270 //--------------------------------------------------------------------------------------------------------- 271 // XTopWindowListener 272 // Attention: windowActivated(), windowDeactivated() and windowClosing() are implement only! All other are empty! 273 //--------------------------------------------------------------------------------------------------------- 274 virtual void SAL_CALL windowActivated ( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ); 275 virtual void SAL_CALL windowDeactivated ( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ); 276 virtual void SAL_CALL windowOpened ( const css::lang::EventObject& /*aEvent*/ ) throw( css::uno::RuntimeException ) {}; 277 virtual void SAL_CALL windowClosing ( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ); 278 virtual void SAL_CALL windowClosed ( const css::lang::EventObject& /*aEvent*/ ) throw( css::uno::RuntimeException ) {}; 279 virtual void SAL_CALL windowMinimized ( const css::lang::EventObject& /*aEvent*/ ) throw( css::uno::RuntimeException ) {}; 280 virtual void SAL_CALL windowNormalized ( const css::lang::EventObject& /*aEvent*/ ) throw( css::uno::RuntimeException ) {}; 281 282 //--------------------------------------------------------------------------------------------------------- 283 // XEventListener 284 //--------------------------------------------------------------------------------------------------------- 285 virtual void SAL_CALL disposing ( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ); 286 287 //--------------------------------------------------------------------------------------------------------- 288 // XActionLockable 289 //--------------------------------------------------------------------------------------------------------- 290 virtual sal_Bool SAL_CALL isActionLocked ( ) throw( css::uno::RuntimeException ); 291 virtual void SAL_CALL addActionLock ( ) throw( css::uno::RuntimeException ); 292 virtual void SAL_CALL removeActionLock( ) throw( css::uno::RuntimeException ); 293 virtual void SAL_CALL setActionLocks ( sal_Int16 nLock ) throw( css::uno::RuntimeException ); 294 virtual sal_Int16 SAL_CALL resetActionLocks( ) throw( css::uno::RuntimeException ); 295 296 //--------------------------------------------------------------------------------------------------------- 297 // XCloseable 298 //--------------------------------------------------------------------------------------------------------- 299 virtual void SAL_CALL close( sal_Bool bDeliverOwnerShip ) throw( css::util::CloseVetoException, 300 css::uno::RuntimeException ); 301 302 //--------------------------------------------------------------------------------------------------------- 303 // XCloseBroadcaster 304 //--------------------------------------------------------------------------------------------------------- 305 virtual void SAL_CALL addCloseListener ( const css::uno::Reference< css::util::XCloseListener >& xListener ) throw (css::uno::RuntimeException); 306 virtual void SAL_CALL removeCloseListener( const css::uno::Reference< css::util::XCloseListener >& xListener ) throw (css::uno::RuntimeException); 307 308 //--------------------------------------------------------------------------------------------------------- 309 // XTitle 310 //--------------------------------------------------------------------------------------------------------- 311 virtual ::rtl::OUString SAL_CALL getTitle( ) throw (css::uno::RuntimeException); 312 virtual void SAL_CALL setTitle( const ::rtl::OUString& sTitle ) throw (css::uno::RuntimeException); 313 314 //--------------------------------------------------------------------------------------------------------- 315 // XTitleChangeBroadcaster 316 //--------------------------------------------------------------------------------------------------------- 317 virtual void SAL_CALL addTitleChangeListener ( const css::uno::Reference< css::frame::XTitleChangeListener >& xListener) throw (css::uno::RuntimeException); 318 virtual void SAL_CALL removeTitleChangeListener( const css::uno::Reference< css::frame::XTitleChangeListener >& xListenr ) throw (css::uno::RuntimeException); 319 320 //--------------------------------------------------------------------------------------------------------- 321 // PropertySetHelper => XPropertySet, XPropertySetInfo 322 //--------------------------------------------------------------------------------------------------------- 323 private: 324 325 void impl_initializePropInfo(); 326 327 virtual void SAL_CALL impl_setPropertyValue(const ::rtl::OUString& sProperty, 328 sal_Int32 nHandle , 329 const css::uno::Any& aValue ); 330 331 virtual css::uno::Any SAL_CALL impl_getPropertyValue(const ::rtl::OUString& sProperty, 332 sal_Int32 nHandle ); 333 334 //------------------------------------------------------------------------------------------------------------- 335 // private methods 336 //------------------------------------------------------------------------------------------------------------- 337 338 private: 339 340 /*-****************************************************************************************************//** 341 @short helper methods 342 @descr Follow methods are needed at different points of our code (more then ones!). 343 344 @attention Threadsafe methods are signed by "implts_..."! 345 *//*-*****************************************************************************************************/ 346 347 // threadsafe 348 void implts_sendFrameActionEvent ( const css::frame::FrameAction& aAction ); 349 void implts_resizeComponentWindow ( ); 350 void implts_setIconOnWindow ( ); 351 void implts_startWindowListening ( ); 352 void implts_stopWindowListening ( ); 353 void implts_saveWindowAttributes ( ); 354 void implts_checkSuicide ( ); 355 void implts_forgetSubFrames ( ); 356 DECL_LINK( implts_windowClosing, void* ); 357 css::uno::Reference< css::awt::XTopWindow > impl_searchTopWindow ( const css::uno::Reference< css::awt::XWindow >& xWindow ); 358 359 // non threadsafe 360 void impl_checkMenuCloser ( ); 361 void impl_setCloser ( const css::uno::Reference< css::frame::XFrame >& xFrame , 362 sal_Bool bState ); 363 void impl_disposeContainerWindow ( css::uno::Reference< css::awt::XWindow >& xWindow ); 364 static const css::uno::Sequence< css::beans::Property > impl_getStaticPropertyDescriptor( ); 365 366 //------------------------------------------------------------------------------------------------------------- 367 // debug methods 368 // (should be private everyway!) 369 //------------------------------------------------------------------------------------------------------------- 370 371 /*-****************************************************************************************************//** 372 @short debug-method to check incoming parameter of some other mehods of this class 373 @descr The following methods are used to check parameters for other methods 374 of this class. The return value is used directly for an ASSERT(...). 375 376 @attention This methods are static and can't use our member directly! It's better for threadsafe code... 377 because we call it with references or pointer to check variables ... and must make it safe 378 by himself! 379 380 @seealso ASSERTs in implementation! 381 382 @param references to checking variables 383 @return sal_True ,on invalid parameter 384 @return sal_False ,otherwise 385 386 @onerror We return sal_True 387 *//*-*****************************************************************************************************/ 388 389 #ifdef ENABLE_ASSERTIONS 390 391 private: 392 393 static sal_Bool implcp_ctor ( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory ); 394 static sal_Bool implcp_setActiveFrame ( const css::uno::Reference< css::frame::XFrame >& xFrame ); 395 static sal_Bool implcp_addFrameActionListener ( const css::uno::Reference< css::frame::XFrameActionListener >& xListener ); 396 static sal_Bool implcp_removeFrameActionListener ( const css::uno::Reference< css::frame::XFrameActionListener >& xListener ); 397 static sal_Bool implcp_addEventListener ( const css::uno::Reference< css::lang::XEventListener >& xListener ); 398 static sal_Bool implcp_removeEventListener ( const css::uno::Reference< css::lang::XEventListener >& xListener ); 399 static sal_Bool implcp_windowResized ( const css::awt::WindowEvent& aEvent ); 400 static sal_Bool implcp_focusGained ( const css::awt::FocusEvent& aEvent ); 401 static sal_Bool implcp_windowActivated ( const css::lang::EventObject& aEvent ); 402 static sal_Bool implcp_windowDeactivated ( const css::lang::EventObject& aEvent ); 403 static sal_Bool implcp_disposing ( const css::lang::EventObject& aEvent ); 404 405 #endif // #ifdef ENABLE_ASSERTIONS 406 407 //************************************************************************************************************* 408 // variables 409 // -threadsafe by own read/write lock "m_aLock" 410 //************************************************************************************************************* 411 private: 412 413 css::uno::Reference< css::lang::XMultiServiceFactory > m_xFactory ; /// reference to factory, which has create this instance 414 css::uno::Reference< css::task::XStatusIndicatorFactory > m_xIndicatorFactoryHelper ; /// reference to factory helper to create status indicator objects 415 css::uno::WeakReference< css::task::XStatusIndicator > m_xIndicatorInterception ; /// points to an external set progress, which should be used instead of the internal one. 416 css::uno::Reference< css::frame::XDispatchProvider > m_xDispatchHelper ; /// helper for XDispatch/Provider and interception interfaces 417 css::uno::Reference< css::frame::XFrames > m_xFramesHelper ; /// helper for XFrames, XIndexAccess and XElementAccess interfaces 418 ::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer ; /// container for ALL Listener 419 css::uno::Reference< css::frame::XFramesSupplier > m_xParent ; /// parent of this frame 420 css::uno::Reference< css::awt::XWindow > m_xContainerWindow ; /// containerwindow of this frame for embedded components 421 css::uno::Reference< css::awt::XWindow > m_xComponentWindow ; /// window of the actual component 422 css::uno::Reference< css::frame::XController > m_xController ; /// controller of the actual frame 423 css::uno::Reference< css::datatransfer::dnd::XDropTargetListener > m_xDropTargetListener ; /// listen to drag & drop 424 EActiveState m_eActiveState ; /// state, if i'am a member of active path in tree or i have the focus or ... 425 ::rtl::OUString m_sName ; /// name of this frame 426 sal_Bool m_bIsFrameTop ; /// frame has no parent or the parent is a taskor the desktop 427 sal_Bool m_bConnected ; /// due to FrameActionEvent 428 sal_Int16 m_nExternalLockCount ; 429 css::uno::Reference< css::frame::XDispatchRecorderSupplier > m_xDispatchRecorderSupplier ; /// is used for dispatch recording and will be set/get from outside. Frame provide it only! 430 SvtCommandOptions m_aCommandOptions ; /// ref counted class to support disabling commands defined by configuration file 431 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 432 sal_Bool m_bIsHidden ; /// indicates, if this frame is used in hidden mode or not 433 static css::uno::WeakReference< css::frame::XFrame > m_xCloserFrame ; /// holds the only frame, which must show the special closer menu item (can be NULL!) 434 css::uno::Reference< ::com::sun::star::frame::XLayoutManager > m_xLayoutManager ; /// is used to layout the child windows of the frame. 435 css::uno::Reference< css::frame::XDispatchInformationProvider > m_xDispatchInfoHelper ; 436 css::uno::Reference< css::frame::XTitle > m_xTitleHelper ; 437 438 protected: 439 440 FrameContainer m_aChildFrameContainer ; /// array of child frames 441 442 inline css::uno::Reference< css::lang::XMultiServiceFactory > impl_getFactory() 443 { 444 ReadGuard aReadLock( m_aLock ); 445 return m_xFactory; 446 } 447 448 inline ::rtl::OUString impl_getName() 449 { 450 ReadGuard aReadLock( m_aLock ); 451 return m_sName; 452 } 453 454 inline css::uno::Reference< css::awt::XWindow > impl_getContainerWindow() 455 { 456 ReadGuard aReadLock( m_aLock ); 457 return m_xContainerWindow; 458 } 459 460 inline css::uno::Reference< css::frame::XDispatchProvider > impl_getDispatchHelper() 461 { 462 ReadGuard aReadLock( m_aLock ); 463 return m_xDispatchHelper; 464 } 465 466 inline css::uno::Reference< css::frame::XFramesSupplier > impl_getParent() 467 { 468 ReadGuard aReadLock( m_aLock ); 469 return m_xParent; 470 } 471 472 }; // class Frame 473 474 } // namespace framework 475 476 #endif // #ifndef __FRAMEWORK_SERVICES_FRAME_HXX_ 477