frame.hxx (07a3d7f1) | frame.hxx (9f813b30) |
---|---|
1/************************************************************** | 1/************************************************************** |
2 * | 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 | 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 * | 10 * |
11 * http://www.apache.org/licenses/LICENSE-2.0 | 11 * http://www.apache.org/licenses/LICENSE-2.0 |
12 * | 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. | 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 * | 19 * |
20 *************************************************************/ 21 22 23 24#ifndef __FRAMEWORK_SERVICES_FRAME_HXX_ 25#define __FRAMEWORK_SERVICES_FRAME_HXX_ 26 27//_________________________________________________________________________________________________________________ --- 64 unchanged lines hidden (view full) --- 92 93//_________________________________________________________________________________________________________________ 94// exported const 95//_________________________________________________________________________________________________________________ 96 97// This enum can be used to set different active states of frames 98enum EActiveState 99{ | 20 *************************************************************/ 21 22 23 24#ifndef __FRAMEWORK_SERVICES_FRAME_HXX_ 25#define __FRAMEWORK_SERVICES_FRAME_HXX_ 26 27//_________________________________________________________________________________________________________________ --- 64 unchanged lines hidden (view full) --- 92 93//_________________________________________________________________________________________________________________ 94// exported const 95//_________________________________________________________________________________________________________________ 96 97// This enum can be used to set different active states of frames 98enum 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! | 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 | 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 | 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) | 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 | 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 | 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 | 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 | 129 OPropertySetHelper |
130 implements the property set 131 @base OWeakObject 132 provides the refcount and XInterface, XWeak | 130 implements the property set 131 @base OWeakObject 132 provides the refcount and XInterface, XWeak |
133 134 @devstatus ready to use 135 @threadsafe yes | 133 134 @devstatus ready to use 135 @threadsafe yes |
136 @modified 04.10.2004 10:47, as96863 | 136 @modified 04.10.2004 10:47, as96863 |
137*//*-*************************************************************************************************************/ 138class 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 , | 137*//*-*************************************************************************************************************/ 138class 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 , | 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! | 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 | 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 --- 19 unchanged lines hidden (view full) --- 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 //--------------------------------------------------------------------------------------------------------- | 159 public ::cppu::OWeakObject // helper implements XInterface, XWeak 160{ 161 //------------------------------------------------------------------------------------------------------------- 162 // public methods 163 //------------------------------------------------------------------------------------------------------------- 164 165 public: 166 --- 19 unchanged lines hidden (view full) --- 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 ); | 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 ); | 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 ); | 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 ); --- 129 unchanged lines hidden (view full) --- 334 //------------------------------------------------------------------------------------------------------------- 335 // private methods 336 //------------------------------------------------------------------------------------------------------------- 337 338 private: 339 340 /*-****************************************************************************************************//** 341 @short helper methods | 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 ); --- 129 unchanged lines hidden (view full) --- 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!). | 342 @descr Follow methods are needed at different points of our code (more than once!). |
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 ( ); --- 13 unchanged lines hidden (view full) --- 364 static const css::uno::Sequence< css::beans::Property > impl_getStaticPropertyDescriptor( ); 365 366 //------------------------------------------------------------------------------------------------------------- 367 // debug methods 368 // (should be private everyway!) 369 //------------------------------------------------------------------------------------------------------------- 370 371 /*-****************************************************************************************************//** | 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 ( ); --- 13 unchanged lines hidden (view full) --- 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 | 372 @short debug-method to check incoming parameter of some other methods 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 | 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 | 376 @attention These 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 --- 30 unchanged lines hidden (view full) --- 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 | 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 --- 30 unchanged lines hidden (view full) --- 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 ... | 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 | 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 | 426 sal_Bool m_bIsFrameTop ; /// frame has no parent or the parent is a task on 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 | 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 | 431 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 |
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 void* mp_WindowCommandDispatch ; /// holds the window command dispatch 438 439 protected: --- 38 unchanged lines hidden --- | 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 void* mp_WindowCommandDispatch ; /// holds the window command dispatch 438 439 protected: --- 38 unchanged lines hidden --- |