update dev300-m58
[ooovba.git] / framework / inc / services / layoutmanager.hxx
blob7b4828676bb86d7c9287e9cadbf22a2a8c9c88d7
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: layoutmanager.hxx,v $
10 * $Revision: 1.34 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef __FRAMEWORK_SERVICES_LAYOUTMANAGER_HXX_
32 #define __FRAMEWORK_SERVICES_LAYOUTMANAGER_HXX_
34 /** Attention: stl headers must(!) be included at first. Otherwhise it can make trouble
35 with solaris headers ...
37 #include <vector>
39 //_________________________________________________________________________________________________________________
40 // my own includes
41 //_________________________________________________________________________________________________________________
42 #include <threadhelp/threadhelpbase.hxx>
43 #include <threadhelp/resetableguard.hxx>
44 #include <threadhelp/writeguard.hxx>
45 #include <threadhelp/readguard.hxx>
46 #include <macros/generic.hxx>
47 #include <macros/xinterface.hxx>
48 #include <macros/xtypeprovider.hxx>
49 #include <macros/xserviceinfo.hxx>
50 #include <stdtypes.h>
51 #include <properties.h>
52 #include <stdtypes.h>
53 #include <uielement/menubarmanager.hxx>
54 #include <uiconfiguration/windowstateconfiguration.hxx>
55 #include <classes/addonsoptions.hxx>
57 //_________________________________________________________________________________________________________________
58 // interface includes
59 //_________________________________________________________________________________________________________________
60 #include <com/sun/star/lang/XServiceInfo.hpp>
61 #include <com/sun/star/lang/XTypeProvider.hpp>
62 #include <com/sun/star/frame/XLayoutManager.hpp>
63 #include <com/sun/star/ui/XUIConfigurationManager.hpp>
64 #include <com/sun/star/ui/XUIConfiguration.hpp>
65 #include <com/sun/star/frame/XModuleManager.hpp>
66 #include <com/sun/star/frame/XFrameActionListener.hpp>
67 #include <com/sun/star/awt/XWindowListener.hpp>
68 #include <com/sun/star/util/XURLTransformer.hpp>
69 #include <com/sun/star/ui/XUIElementFactory.hpp>
70 #include <com/sun/star/frame/XInplaceLayout.hpp>
71 #include <com/sun/star/ui/DockingArea.hpp>
72 #include <com/sun/star/awt/XDockableWindow.hpp>
73 #include <com/sun/star/awt/XDockableWindowListener.hpp>
74 #include <com/sun/star/frame/XMenuBarMergingAcceptor.hpp>
75 #include <com/sun/star/frame/XLayoutManagerEventBroadcaster.hpp>
77 //_________________________________________________________________________________________________________________
78 // other includes
79 //_________________________________________________________________________________________________________________
80 #include <cppuhelper/propshlp.hxx>
81 #include <cppuhelper/interfacecontainer.hxx>
82 #include <cppuhelper/weak.hxx>
83 #include <vcl/wintypes.hxx>
84 #include <svtools/miscopt.hxx>
85 #include <vcl/toolbox.hxx>
86 #include <vcl/timer.hxx>
88 class MenuBar;
89 namespace framework
91 class GlobalSettings;
92 class LayoutManager : public css::lang::XTypeProvider ,
93 public css::lang::XServiceInfo ,
94 public ::com::sun::star::frame::XLayoutManager ,
95 public css::awt::XWindowListener ,
96 public css::frame::XFrameActionListener ,
97 public ::com::sun::star::ui::XUIConfigurationListener ,
98 public ::com::sun::star::frame::XInplaceLayout ,
99 public css::awt::XDockableWindowListener ,
100 public ::com::sun::star::frame::XMenuBarMergingAcceptor,
101 public css::frame::XLayoutManagerEventBroadcaster ,
102 // base classes
103 // Order is neccessary for right initialization!
104 private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
105 public ::cppu::OBroadcastHelper ,
106 public ::cppu::OPropertySetHelper , // => XPropertySet / XFastPropertySet / XMultiPropertySet
107 public ::cppu::OWeakObject // => XWeak, XInterface
109 public:
110 enum { DOCKINGAREAS_COUNT = 4 };
112 LayoutManager( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rSMGR );
113 virtual ~LayoutManager();
115 /** declaration of XInterface, XTypeProvider, XServiceInfo */
116 FWK_DECLARE_XINTERFACE
117 FWK_DECLARE_XTYPEPROVIDER
118 DECLARE_XSERVICEINFO
120 //---------------------------------------------------------------------------------------------------------
121 // XLayoutManager
122 //---------------------------------------------------------------------------------------------------------
123 virtual void SAL_CALL attachFrame( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& Frame ) throw (::com::sun::star::uno::RuntimeException);
124 virtual void SAL_CALL reset( ) throw (::com::sun::star::uno::RuntimeException);
125 virtual ::com::sun::star::awt::Rectangle SAL_CALL getCurrentDockingArea( ) throw (::com::sun::star::uno::RuntimeException);
126 virtual ::com::sun::star::uno::Reference< ::com::sun::star::ui::XDockingAreaAcceptor > SAL_CALL getDockingAreaAcceptor() throw (::com::sun::star::uno::RuntimeException);
127 virtual void SAL_CALL setDockingAreaAcceptor( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XDockingAreaAcceptor >& xDockingAreaAcceptor ) throw (::com::sun::star::uno::RuntimeException);
128 virtual void SAL_CALL createElement( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException);
129 virtual void SAL_CALL destroyElement( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException);
130 virtual ::sal_Bool SAL_CALL requestElement( const ::rtl::OUString& ResourceURL ) throw (::com::sun::star::uno::RuntimeException);
131 virtual ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > SAL_CALL getElement( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException);
132 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > > SAL_CALL getElements( ) throw (::com::sun::star::uno::RuntimeException);
133 virtual sal_Bool SAL_CALL showElement( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException);
134 virtual sal_Bool SAL_CALL hideElement( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException);
135 virtual sal_Bool SAL_CALL dockWindow( const ::rtl::OUString& aName, ::com::sun::star::ui::DockingArea DockingArea, const ::com::sun::star::awt::Point& Pos ) throw (::com::sun::star::uno::RuntimeException);
136 virtual ::sal_Bool SAL_CALL dockAllWindows( ::sal_Int16 nElementType ) throw (::com::sun::star::uno::RuntimeException);
137 virtual sal_Bool SAL_CALL floatWindow( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException);
138 virtual ::sal_Bool SAL_CALL lockWindow( const ::rtl::OUString& ResourceURL ) throw (::com::sun::star::uno::RuntimeException);
139 virtual ::sal_Bool SAL_CALL unlockWindow( const ::rtl::OUString& ResourceURL ) throw (::com::sun::star::uno::RuntimeException);
140 virtual void SAL_CALL setElementSize( const ::rtl::OUString& aName, const ::com::sun::star::awt::Size& aSize ) throw (::com::sun::star::uno::RuntimeException);
141 virtual void SAL_CALL setElementPos( const ::rtl::OUString& aName, const ::com::sun::star::awt::Point& aPos ) throw (::com::sun::star::uno::RuntimeException);
142 virtual void SAL_CALL setElementPosSize( const ::rtl::OUString& aName, const ::com::sun::star::awt::Point& aPos, const ::com::sun::star::awt::Size& aSize ) throw (::com::sun::star::uno::RuntimeException);
143 virtual sal_Bool SAL_CALL isElementVisible( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException);
144 virtual sal_Bool SAL_CALL isElementFloating( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException);
145 virtual sal_Bool SAL_CALL isElementDocked( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException);
146 virtual ::sal_Bool SAL_CALL isElementLocked( const ::rtl::OUString& ResourceURL ) throw (::com::sun::star::uno::RuntimeException);
147 virtual ::com::sun::star::awt::Size SAL_CALL getElementSize( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException);
148 virtual ::com::sun::star::awt::Point SAL_CALL getElementPos( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException);
149 virtual void SAL_CALL lock( ) throw (::com::sun::star::uno::RuntimeException);
150 virtual void SAL_CALL unlock( ) throw (::com::sun::star::uno::RuntimeException);
151 virtual void SAL_CALL doLayout( ) throw (::com::sun::star::uno::RuntimeException);
152 virtual void SAL_CALL setVisible( sal_Bool bVisible ) throw (::com::sun::star::uno::RuntimeException);
153 virtual sal_Bool SAL_CALL isVisible() throw (::com::sun::star::uno::RuntimeException);
155 //---------------------------------------------------------------------------------------------------------
156 // XInplaceLayout
157 //---------------------------------------------------------------------------------------------------------
158 virtual void SAL_CALL setInplaceMenuBar( sal_Int64 pInplaceMenuBarPointer ) throw (::com::sun::star::uno::RuntimeException);
159 virtual void SAL_CALL resetInplaceMenuBar( ) throw (::com::sun::star::uno::RuntimeException);
161 //---------------------------------------------------------------------------------------------------------
162 // XMenuBarMergingAcceptor
163 //---------------------------------------------------------------------------------------------------------
164 virtual sal_Bool SAL_CALL setMergedMenuBar( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& xMergedMenuBar )
165 throw (::com::sun::star::uno::RuntimeException);
166 virtual void SAL_CALL removeMergedMenuBar( ) throw (::com::sun::star::uno::RuntimeException);
168 //---------------------------------------------------------------------------------------------------------
169 // XWindowListener
170 //---------------------------------------------------------------------------------------------------------
171 virtual void SAL_CALL windowResized( const css::awt::WindowEvent& aEvent ) throw( css::uno::RuntimeException );
172 virtual void SAL_CALL windowMoved( const css::awt::WindowEvent& aEvent ) throw( css::uno::RuntimeException );
173 virtual void SAL_CALL windowShown( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException );
174 virtual void SAL_CALL windowHidden( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException );
176 //---------------------------------------------------------------------------------------------------------
177 // XFrameActionListener
178 //---------------------------------------------------------------------------------------------------------
179 virtual void SAL_CALL frameAction( const css::frame::FrameActionEvent& aEvent ) throw ( css::uno::RuntimeException );
181 //---------------------------------------------------------------------------------------------------------
182 // XEventListener
183 //---------------------------------------------------------------------------------------------------------
184 using cppu::OPropertySetHelper::disposing;
185 virtual void SAL_CALL disposing( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException );
187 //---------------------------------------------------------------------------------------------------------
188 // XUIConfigurationListener
189 //---------------------------------------------------------------------------------------------------------
190 virtual void SAL_CALL elementInserted( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
191 virtual void SAL_CALL elementRemoved( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
192 virtual void SAL_CALL elementReplaced( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
194 //---------------------------------------------------------------------------------------------------------
195 // XDockableWindowListener
196 //---------------------------------------------------------------------------------------------------------
197 virtual void SAL_CALL startDocking( const ::com::sun::star::awt::DockingEvent& e ) throw (::com::sun::star::uno::RuntimeException);
198 virtual ::com::sun::star::awt::DockingData SAL_CALL docking( const ::com::sun::star::awt::DockingEvent& e ) throw (::com::sun::star::uno::RuntimeException);
199 virtual void SAL_CALL endDocking( const ::com::sun::star::awt::EndDockingEvent& e ) throw (::com::sun::star::uno::RuntimeException);
200 virtual sal_Bool SAL_CALL prepareToggleFloatingMode( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException);
201 virtual void SAL_CALL toggleFloatingMode( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException);
202 virtual void SAL_CALL closed( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException);
203 virtual void SAL_CALL endPopupMode( const ::com::sun::star::awt::EndPopupModeEvent& e ) throw (::com::sun::star::uno::RuntimeException);
205 //---------------------------------------------------------------------------------------------------------
206 // XLayoutManagerEventBroadcaster
207 //---------------------------------------------------------------------------------------------------------
208 virtual void SAL_CALL addLayoutManagerEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManagerListener >& aLayoutManagerListener ) throw (::com::sun::star::uno::RuntimeException);
209 virtual void SAL_CALL removeLayoutManagerEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManagerListener >& aLayoutManagerListener ) throw (::com::sun::star::uno::RuntimeException);
211 DECL_LINK( MenuBarClose, MenuBar * );
212 DECL_LINK( WindowEventListener, VclSimpleEvent* );
214 struct DockedData
216 DockedData() : m_aPos( LONG_MAX, LONG_MAX ),
217 m_nDockedArea( ::com::sun::star::ui::DockingArea_DOCKINGAREA_TOP ),
218 m_bLocked( sal_False ) {}
220 Point m_aPos;
221 Size m_aSize;
222 sal_Int16 m_nDockedArea;
223 sal_Bool m_bLocked;
225 struct FloatingData
227 FloatingData() : m_aPos( LONG_MAX, LONG_MAX ),
228 m_nLines( 1 ),
229 m_bIsHorizontal( sal_True ) {}
231 Point m_aPos;
232 Size m_aSize;
233 sal_Int16 m_nLines;
234 sal_Bool m_bIsHorizontal;
236 struct SingleRowColumnWindowData
238 SingleRowColumnWindowData() : nVarSize( 0 ), nStaticSize( 0 ), nSpace( 0 ) {}
240 std::vector< rtl::OUString > aUIElementNames;
241 std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > > aRowColumnWindows;
242 std::vector< ::com::sun::star::awt::Rectangle > aRowColumnWindowSizes;
243 std::vector< sal_Int32 > aRowColumnSpace;
244 ::com::sun::star::awt::Rectangle aRowColumnRect;
245 sal_Int32 nVarSize;
246 sal_Int32 nStaticSize;
247 sal_Int32 nSpace;
248 sal_Int32 nRowColumn;
251 protected:
252 DECL_LINK( AsyncLayoutHdl, Timer * );
254 private:
255 enum DockingOperation
257 DOCKOP_BEFORE_COLROW,
258 DOCKOP_ON_COLROW,
259 DOCKOP_AFTER_COLROW
261 struct UIElement
263 UIElement() : m_bFloating( sal_False ),
264 m_bVisible( sal_True ),
265 m_bUserActive( sal_False ),
266 m_bCreateNewRowCol0( sal_False ),
267 m_bDeactiveHide( sal_False ),
268 m_bMasterHide( sal_False ),
269 m_bContextSensitive( sal_False ),
270 m_bContextActive( sal_True ),
271 m_bNoClose( sal_False ),
272 m_bSoftClose( sal_False ),
273 m_bStateRead( sal_False ),
274 m_nStyle( BUTTON_SYMBOL )
277 UIElement( const rtl::OUString& rName,
278 const rtl::OUString& rType,
279 const com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement >& rUIElement,
280 sal_Bool bFloating = sal_False
281 ) : m_aType( rType ),
282 m_aName( rName ),
283 m_xUIElement( rUIElement ),
284 m_bFloating( bFloating ),
285 m_bVisible( sal_True ),
286 m_bUserActive( sal_False ),
287 m_bCreateNewRowCol0( sal_False ),
288 m_bDeactiveHide( sal_False ),
289 m_bMasterHide( sal_False ),
290 m_bContextSensitive( sal_False ),
291 m_bContextActive( sal_True ),
292 m_bNoClose( sal_False ),
293 m_bSoftClose( sal_False ),
294 m_bStateRead( sal_False ),
295 m_nStyle( BUTTON_SYMBOL ) {}
297 bool operator< ( const UIElement& aUIElement ) const;
298 UIElement& operator=( const UIElement& rUIElement );
300 rtl::OUString m_aType;
301 rtl::OUString m_aName;
302 rtl::OUString m_aUIName;
303 com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > m_xUIElement;
304 sal_Bool m_bFloating,
305 m_bVisible,
306 m_bUserActive,
307 m_bCreateNewRowCol0,
308 m_bDeactiveHide,
309 m_bMasterHide,
310 m_bContextSensitive,
311 m_bContextActive;
312 sal_Bool m_bNoClose,
313 m_bSoftClose,
314 m_bStateRead;
315 sal_Int16 m_nStyle;
316 DockedData m_aDockedData;
317 FloatingData m_aFloatingData;
320 typedef std::vector< UIElement > UIElementVector;
322 //---------------------------------------------------------------------------------------------------------
323 // helper
324 //---------------------------------------------------------------------------------------------------------
326 //---------------------------------------------------------------------------------------------------------
327 // helper
328 //---------------------------------------------------------------------------------------------------------
329 void impl_clearUpMenuBar();
330 void implts_reset( sal_Bool bAttach );
331 void implts_setMenuBarCloser(sal_Bool bCloserState);
332 void implts_updateMenuBarClose();
333 sal_Bool implts_resetMenuBar();
335 void implts_lock();
336 sal_Bool implts_unlock();
338 sal_Bool implts_findElement( const rtl::OUString& aName, rtl::OUString& aElementType, rtl::OUString& aElementName, ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement >& xSettings );
339 sal_Bool implts_findElement( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xUIElement, UIElement& aElementData );
340 sal_Bool implts_findElement( const rtl::OUString& aName, UIElement& aElementData );
341 UIElement& impl_findElement( const rtl::OUString& aName );
342 sal_Bool implts_insertUIElement( const UIElement& rUIElement );
344 void implts_refreshContextToolbarsVisibility();
345 void implts_writeNewStateData( const rtl::OUString aName, const ::com::sun::star::uno::Reference< com::sun::star::awt::XWindow >& xWindow );
346 sal_Bool implts_readWindowStateData( const rtl::OUString& rName, UIElement& rElementData );
347 void implts_writeWindowStateData( const rtl::OUString& rName, const UIElement& rElementData );
348 void implts_setElementData( UIElement& rUIElement, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDockableWindow >& rDockWindow );
349 void implts_sortUIElements();
350 void implts_destroyElements();
351 void implts_destroyDockingAreaWindows();
352 void implts_createAddonsToolBars();
353 void implts_createCustomToolBars();
354 void implts_createNonContextSensitiveToolBars();
355 void implts_createCustomToolBars( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > >& aCustomTbxSeq );
356 void implts_createCustomToolBar( const rtl::OUString& aTbxResName, const rtl::OUString& aTitle );
357 void implts_toggleFloatingUIElementsVisibility( sal_Bool bActive );
358 void implts_reparentChildWindows();
360 sal_Bool implts_isEmbeddedLayoutManager() const;
361 sal_Int16 implts_getCurrentSymbolsSize();
362 sal_Int16 implts_getCurrentSymbolsStyle();
363 ::com::sun::star::uno::Reference< com::sun::star::awt::XWindowPeer > implts_createToolkitWindow( const ::com::sun::star::uno::Reference< com::sun::star::awt::XWindowPeer >& rParent );
364 ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > implts_createElement( const rtl::OUString& aName );
365 rtl::OUString implts_generateGenericAddonToolbarTitle( sal_Int32 nNumber ) const;
367 // docking methods
368 ::Rectangle implts_calcHotZoneRect( const ::Rectangle& rRect, sal_Int32 nHotZoneOffset );
369 void implts_calcDockingPosSize( UIElement& aUIElement, DockingOperation& eDockOperation, ::Rectangle& rTrackingRect, const Point& rMousePos );
370 DockingOperation implts_determineDockingOperation( ::com::sun::star::ui::DockingArea DockingArea, const ::Rectangle& rRowColRect, const Point& rMousePos );
371 ::Rectangle implts_getWindowRectFromRowColumn( ::com::sun::star::ui::DockingArea DockingArea, const SingleRowColumnWindowData& rRowColumnWindowData, const ::Point& rMousePos, const rtl::OUString& rExcludeElementName );
372 ::Rectangle implts_determineFrontDockingRect( ::com::sun::star::ui::DockingArea eDockingArea,
373 sal_Int32 nRowCol,
374 const ::Rectangle& rDockedElementRect,
375 const ::rtl::OUString& rMovedElementName,
376 const ::Rectangle& rMovedElementRect );
377 void implts_calcWindowPosSizeOnSingleRowColumn( sal_Int32 nDockingArea,
378 sal_Int32 nOffset,
379 SingleRowColumnWindowData& rRowColumnWindowData,
380 const ::Size& rContainerSize );
381 ::Rectangle implts_calcTrackingAndElementRect( ::com::sun::star::ui::DockingArea eDockingArea,
382 sal_Int32 nRowCol,
383 UIElement& rUIElement,
384 const ::Rectangle& rTrackingRect,
385 const ::Rectangle& rRowColumnRect,
386 const ::Size& rContainerWinSize );
387 void implts_renumberRowColumnData( ::com::sun::star::ui::DockingArea eDockingArea, DockingOperation eDockingOperation, const UIElement& rUIElement );
389 // layouting methods
390 sal_Bool implts_compareRectangles( const ::com::sun::star::awt::Rectangle& rRect1, const ::com::sun::star::awt::Rectangle& rRect2 );
391 ::Size implts_getTopBottomDockingAreaSizes();
392 ::Size implts_getContainerWindowOutputSize();
393 ::com::sun::star::awt::Rectangle implts_getDockingAreaWindowSizes();
394 void implts_getDockingAreaElementInfos( ::com::sun::star::ui::DockingArea DockingArea, std::vector< SingleRowColumnWindowData >& rRowColumnsWindowData );
395 void implts_getDockingAreaElementInfoOnSingleRowCol( ::com::sun::star::ui::DockingArea,
396 sal_Int32 nRowCol,
397 SingleRowColumnWindowData& rRowColumnWindowData );
398 ::Point implts_findNextCascadeFloatingPos();
399 void implts_findNextDockingPos( ::com::sun::star::ui::DockingArea DockingArea, const ::Size& aUIElementSize, ::Point& rVirtualPos, ::Point& rPixelPos );
400 void implts_sortActiveElement( const UIElement& aElementData );
401 ::com::sun::star::awt::Rectangle implts_calcDockingAreaSizes();
402 void implts_setDockingAreaWindowSizes( const com::sun::star::awt::Rectangle& rBorderSpace );
403 sal_Bool implts_doLayout( sal_Bool bForceRequestBorderSpace );
405 // internal methods to control status/progress bar
406 ::Size implts_getStatusBarSize();
407 void implts_destroyStatusBar();
408 void implts_createStatusBar( const rtl::OUString& rStatusBarName );
409 void implts_createProgressBar();
410 void implts_destroyProgressBar();
411 void implts_setStatusBarPosSize( const ::Point& rPos, const ::Size& rSize );
412 sal_Bool implts_showStatusBar( sal_Bool bStoreState=sal_False );
413 sal_Bool implts_hideStatusBar( sal_Bool bStoreState=sal_False );
414 void implts_readStatusBarState( const rtl::OUString& rStatusBarName );
415 sal_Bool implts_showProgressBar();
416 sal_Bool implts_hideProgressBar();
417 void implts_backupProgressBarWrapper();
419 void implts_setInplaceMenuBar(
420 const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& xMergedMenuBar )
421 throw (::com::sun::star::uno::RuntimeException);
422 void implts_resetInplaceMenuBar()
423 throw (::com::sun::star::uno::RuntimeException);
425 void implts_setVisibleState( sal_Bool bShow );
426 void implts_updateUIElementsVisibleState( sal_Bool bShow );
427 void implts_setCurrentUIVisibility( sal_Bool bShow );
428 sal_Bool impl_parseResourceURL( const rtl::OUString aResourceURL, rtl::OUString& aElementType, rtl::OUString& aElementName );
430 void implts_notifyListeners( short nEvent, ::com::sun::star::uno::Any aInfoParam );
432 void implts_checkElementContainer();
434 DECL_LINK( OptionsChanged, void* );
435 DECL_LINK( SettingsChanged, void* );
437 //---------------------------------------------------------------------------------------------------------
438 // OPropertySetHelper
439 //---------------------------------------------------------------------------------------------------------
440 virtual sal_Bool SAL_CALL convertFastPropertyValue ( com::sun::star::uno::Any& aConvertedValue ,
441 com::sun::star::uno::Any& aOldValue ,
442 sal_Int32 nHandle ,
443 const com::sun::star::uno::Any& aValue ) throw( com::sun::star::lang::IllegalArgumentException );
444 virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle ,
445 const com::sun::star::uno::Any& aValue ) throw( com::sun::star::uno::Exception );
446 using cppu::OPropertySetHelper::getFastPropertyValue;
447 virtual void SAL_CALL getFastPropertyValue( com::sun::star::uno::Any& aValue ,
448 sal_Int32 nHandle ) const;
449 virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
450 virtual ::com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw (::com::sun::star::uno::RuntimeException);
452 static const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > impl_getStaticPropertyDescriptor();
454 css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR; /** reference to factory, which has created this instance. */
455 css::uno::Reference< css::util::XURLTransformer > m_xURLTransformer;
456 css::uno::Reference< css::frame::XFrame > m_xFrame;
457 css::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager > m_xModuleCfgMgr;
458 css::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager > m_xDocCfgMgr;
459 css::uno::WeakReference< css::frame::XModel > m_xModel;
460 css::uno::Reference< css::awt::XWindow > m_xContainerWindow;
461 css::uno::Reference< css::awt::XWindow > m_xDockAreaWindows[DOCKINGAREAS_COUNT];
462 sal_Int32 m_nLockCount;
463 UIElementVector m_aUIElements;
464 bool m_bActive;
465 bool m_bInplaceMenuSet;
466 bool m_bDockingInProgress;
467 bool m_bMenuVisible;
468 bool m_bComponentAttached;
469 bool m_bDoLayout;
470 bool m_bVisible;
471 bool m_bParentWindowVisible;
472 bool m_bMustDoLayout;
473 bool m_bAutomaticToolbars;
474 bool m_bStoreWindowState;
475 bool m_bHideCurrentUI;
476 bool m_bGlobalSettings;
477 DockingOperation m_eDockOperation;
478 UIElement m_aDockUIElement;
479 css::awt::Rectangle m_aDockingArea;
480 css::uno::Reference< ::com::sun::star::ui::XDockingAreaAcceptor > m_xDockingAreaAcceptor;
481 Point m_aStartDockMousePos;
482 css::uno::Reference< ::com::sun::star::lang::XComponent > m_xInplaceMenuBar;
483 MenuBarManager* m_pInplaceMenuBar;
484 css::uno::Reference< ::com::sun::star::ui::XUIElement > m_xMenuBar;
485 UIElement m_aStatusBarElement;
486 UIElement m_aProgressBarElement;
487 com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > m_xProgressBarBackup;
488 css::uno::Reference< ::com::sun::star::frame::XModuleManager > m_xModuleManager;
489 css::uno::Reference< ::com::sun::star::ui::XUIElementFactory > m_xUIElementFactoryManager;
490 bool m_bMenuBarCloser;
491 css::uno::Reference< ::com::sun::star::container::XNameAccess > m_xPersistentWindowState;
492 css::uno::Reference< ::com::sun::star::container::XNameAccess > m_xPersistentWindowStateSupplier;
493 GlobalSettings* m_pGlobalSettings;
494 rtl::OUString m_aModuleIdentifier;
495 rtl::OUString m_aCustomTbxPrefix;
496 rtl::OUString m_aFullCustomTbxPrefix;
497 rtl::OUString m_aFullAddonTbxPrefix;
498 rtl::OUString m_aStatusBarAlias;
499 rtl::OUString m_aProgressBarAlias;
500 rtl::OUString m_aPropDocked;
501 rtl::OUString m_aPropVisible;
502 rtl::OUString m_aPropDockingArea;
503 rtl::OUString m_aPropDockPos;
504 rtl::OUString m_aPropPos;
505 rtl::OUString m_aPropSize;
506 rtl::OUString m_aPropUIName;
507 rtl::OUString m_aPropStyle;
508 rtl::OUString m_aPropLocked;
509 rtl::OUString m_aCustomizeCmd;
510 AddonsOptions* m_pAddonOptions;
511 SvtMiscOptions* m_pMiscOptions;
512 sal_Int16 m_eSymbolsSize;
513 sal_Int16 m_eSymbolsStyle;
514 Timer m_aAsyncLayoutTimer;
515 ::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; // container for ALL Listener
518 } // namespace framework
520 #endif // __FRAMEWORK_SERVICES_LAYOUTMANAGER_HXX_