1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * $RCSfile: layoutmanager.hxx,v $
10*cdf0e10cSrcweir  * $Revision: 1.34 $
11*cdf0e10cSrcweir  *
12*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
13*cdf0e10cSrcweir  *
14*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
15*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
16*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
17*cdf0e10cSrcweir  *
18*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
19*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
22*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
23*cdf0e10cSrcweir  *
24*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
25*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
26*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
27*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
28*cdf0e10cSrcweir  *
29*cdf0e10cSrcweir  ************************************************************************/
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir #ifndef __FRAMEWORK_SERVICES_LAYOUTMANAGER_HXX_
32*cdf0e10cSrcweir #define __FRAMEWORK_SERVICES_LAYOUTMANAGER_HXX_
33*cdf0e10cSrcweir 
34*cdf0e10cSrcweir /** Attention: stl headers must(!) be included at first. Otherwhise it can make trouble
35*cdf0e10cSrcweir                with solaris headers ...
36*cdf0e10cSrcweir */
37*cdf0e10cSrcweir #include <vector>
38*cdf0e10cSrcweir 
39*cdf0e10cSrcweir //_________________________________________________________________________________________________________________
40*cdf0e10cSrcweir //	my own includes
41*cdf0e10cSrcweir //_________________________________________________________________________________________________________________
42*cdf0e10cSrcweir #include <threadhelp/threadhelpbase.hxx>
43*cdf0e10cSrcweir #include <threadhelp/resetableguard.hxx>
44*cdf0e10cSrcweir #include <threadhelp/writeguard.hxx>
45*cdf0e10cSrcweir #include <threadhelp/readguard.hxx>
46*cdf0e10cSrcweir #include <macros/generic.hxx>
47*cdf0e10cSrcweir #include <macros/xinterface.hxx>
48*cdf0e10cSrcweir #include <macros/xtypeprovider.hxx>
49*cdf0e10cSrcweir #include <macros/xserviceinfo.hxx>
50*cdf0e10cSrcweir #include <stdtypes.h>
51*cdf0e10cSrcweir #include <properties.h>
52*cdf0e10cSrcweir #include <stdtypes.h>
53*cdf0e10cSrcweir #include <uielement/menubarmanager.hxx>
54*cdf0e10cSrcweir #include <uiconfiguration/windowstateconfiguration.hxx>
55*cdf0e10cSrcweir #include <framework/addonsoptions.hxx>
56*cdf0e10cSrcweir #include <uielement/panelwindow.hxx>
57*cdf0e10cSrcweir #include <uielement/uielement.hxx>
58*cdf0e10cSrcweir #include <helper/ilayoutnotifications.hxx>
59*cdf0e10cSrcweir 
60*cdf0e10cSrcweir //_________________________________________________________________________________________________________________
61*cdf0e10cSrcweir //	interface includes
62*cdf0e10cSrcweir //_________________________________________________________________________________________________________________
63*cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp>
64*cdf0e10cSrcweir #include <com/sun/star/lang/XTypeProvider.hpp>
65*cdf0e10cSrcweir #include <com/sun/star/frame/XLayoutManager.hpp>
66*cdf0e10cSrcweir #include <com/sun/star/ui/XUIConfigurationManager.hpp>
67*cdf0e10cSrcweir #include <com/sun/star/ui/XUIConfiguration.hpp>
68*cdf0e10cSrcweir #include <com/sun/star/frame/XModuleManager.hpp>
69*cdf0e10cSrcweir #include <com/sun/star/frame/XFrameActionListener.hpp>
70*cdf0e10cSrcweir #include <com/sun/star/awt/XWindowListener.hpp>
71*cdf0e10cSrcweir #include <com/sun/star/util/XURLTransformer.hpp>
72*cdf0e10cSrcweir #include <com/sun/star/ui/XUIElementFactory.hpp>
73*cdf0e10cSrcweir #include <com/sun/star/frame/XInplaceLayout.hpp>
74*cdf0e10cSrcweir #include <com/sun/star/ui/DockingArea.hpp>
75*cdf0e10cSrcweir #include <com/sun/star/awt/XTopWindow2.hpp>
76*cdf0e10cSrcweir #include <com/sun/star/awt/XDockableWindow.hpp>
77*cdf0e10cSrcweir #include <com/sun/star/awt/XDockableWindowListener.hpp>
78*cdf0e10cSrcweir #include <com/sun/star/frame/XMenuBarMergingAcceptor.hpp>
79*cdf0e10cSrcweir #include <com/sun/star/frame/XLayoutManagerEventBroadcaster.hpp>
80*cdf0e10cSrcweir 
81*cdf0e10cSrcweir //_________________________________________________________________________________________________________________
82*cdf0e10cSrcweir //	other includes
83*cdf0e10cSrcweir //_________________________________________________________________________________________________________________
84*cdf0e10cSrcweir #include <cppuhelper/propshlp.hxx>
85*cdf0e10cSrcweir #include <cppuhelper/implbase8.hxx>
86*cdf0e10cSrcweir #include <cppuhelper/interfacecontainer.hxx>
87*cdf0e10cSrcweir #include <comphelper/propertycontainer.hxx>
88*cdf0e10cSrcweir #include <tools/wintypes.hxx>
89*cdf0e10cSrcweir #include <svtools/miscopt.hxx>
90*cdf0e10cSrcweir #include <vcl/toolbox.hxx>
91*cdf0e10cSrcweir #include <vcl/timer.hxx>
92*cdf0e10cSrcweir 
93*cdf0e10cSrcweir class MenuBar;
94*cdf0e10cSrcweir namespace framework
95*cdf0e10cSrcweir {
96*cdf0e10cSrcweir     class ToolbarLayoutManager;
97*cdf0e10cSrcweir     class PanelManager;
98*cdf0e10cSrcweir     class GlobalSettings;
99*cdf0e10cSrcweir     typedef ::cppu::WeakImplHelper8 <   ::com::sun::star::lang::XServiceInfo
100*cdf0e10cSrcweir                                     ,   ::com::sun::star::frame::XLayoutManager
101*cdf0e10cSrcweir                                     ,   ::com::sun::star::awt::XWindowListener
102*cdf0e10cSrcweir                                     ,   ::com::sun::star::frame::XFrameActionListener
103*cdf0e10cSrcweir                                     ,   ::com::sun::star::ui::XUIConfigurationListener
104*cdf0e10cSrcweir                                     ,   ::com::sun::star::frame::XInplaceLayout
105*cdf0e10cSrcweir                                     ,   ::com::sun::star::frame::XMenuBarMergingAcceptor
106*cdf0e10cSrcweir                                     ,   ::com::sun::star::frame::XLayoutManagerEventBroadcaster
107*cdf0e10cSrcweir                                     >   LayoutManager_Base;
108*cdf0e10cSrcweir     typedef ::comphelper::OPropertyContainer    LayoutManager_PBase;
109*cdf0e10cSrcweir     class LayoutManager : public  LayoutManager_Base                    ,
110*cdf0e10cSrcweir                           // base classes
111*cdf0e10cSrcweir                           // Order is neccessary for right initialization!
112*cdf0e10cSrcweir                           private ThreadHelpBase						,	// Struct for right initalization of mutex member! Must be first of baseclasses.
113*cdf0e10cSrcweir                           public  ::cppu::OBroadcastHelper              ,
114*cdf0e10cSrcweir                           public  ILayoutNotifications                  ,
115*cdf0e10cSrcweir                           public  LayoutManager_PBase
116*cdf0e10cSrcweir     {
117*cdf0e10cSrcweir         public:
118*cdf0e10cSrcweir             enum { DOCKINGAREAS_COUNT = 4 };
119*cdf0e10cSrcweir 
120*cdf0e10cSrcweir             LayoutManager( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rSMGR );
121*cdf0e10cSrcweir             virtual ~LayoutManager();
122*cdf0e10cSrcweir 
123*cdf0e10cSrcweir             /** declaration of XInterface, XTypeProvider, XServiceInfo */
124*cdf0e10cSrcweir             FWK_DECLARE_XINTERFACE
125*cdf0e10cSrcweir             FWK_DECLARE_XTYPEPROVIDER
126*cdf0e10cSrcweir             DECLARE_XSERVICEINFO
127*cdf0e10cSrcweir 
128*cdf0e10cSrcweir 		    //---------------------------------------------------------------------------------------------------------
129*cdf0e10cSrcweir             // XLayoutManager
130*cdf0e10cSrcweir 		    //---------------------------------------------------------------------------------------------------------
131*cdf0e10cSrcweir             virtual void SAL_CALL attachFrame( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& Frame ) throw (::com::sun::star::uno::RuntimeException);
132*cdf0e10cSrcweir             virtual void SAL_CALL reset() throw (::com::sun::star::uno::RuntimeException);
133*cdf0e10cSrcweir             virtual ::com::sun::star::awt::Rectangle SAL_CALL getCurrentDockingArea(  ) throw (::com::sun::star::uno::RuntimeException);
134*cdf0e10cSrcweir             virtual ::com::sun::star::uno::Reference< ::com::sun::star::ui::XDockingAreaAcceptor > SAL_CALL getDockingAreaAcceptor() throw (::com::sun::star::uno::RuntimeException);
135*cdf0e10cSrcweir             virtual void SAL_CALL setDockingAreaAcceptor( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XDockingAreaAcceptor >& xDockingAreaAcceptor ) throw (::com::sun::star::uno::RuntimeException);
136*cdf0e10cSrcweir             virtual void SAL_CALL createElement( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException);
137*cdf0e10cSrcweir             virtual void SAL_CALL destroyElement( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException);
138*cdf0e10cSrcweir             virtual ::sal_Bool SAL_CALL requestElement( const ::rtl::OUString& ResourceURL ) throw (::com::sun::star::uno::RuntimeException);
139*cdf0e10cSrcweir             virtual ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > SAL_CALL getElement( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException);
140*cdf0e10cSrcweir             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);
141*cdf0e10cSrcweir             virtual sal_Bool SAL_CALL showElement( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException);
142*cdf0e10cSrcweir             virtual sal_Bool SAL_CALL hideElement( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException);
143*cdf0e10cSrcweir             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);
144*cdf0e10cSrcweir             virtual ::sal_Bool SAL_CALL dockAllWindows( ::sal_Int16 nElementType ) throw (::com::sun::star::uno::RuntimeException);
145*cdf0e10cSrcweir             virtual sal_Bool SAL_CALL floatWindow( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException);
146*cdf0e10cSrcweir             virtual ::sal_Bool SAL_CALL lockWindow( const ::rtl::OUString& ResourceURL ) throw (::com::sun::star::uno::RuntimeException);
147*cdf0e10cSrcweir             virtual ::sal_Bool SAL_CALL unlockWindow( const ::rtl::OUString& ResourceURL ) throw (::com::sun::star::uno::RuntimeException);
148*cdf0e10cSrcweir             virtual void SAL_CALL setElementSize( const ::rtl::OUString& aName, const ::com::sun::star::awt::Size& aSize ) throw (::com::sun::star::uno::RuntimeException);
149*cdf0e10cSrcweir             virtual void SAL_CALL setElementPos( const ::rtl::OUString& aName, const ::com::sun::star::awt::Point& aPos ) throw (::com::sun::star::uno::RuntimeException);
150*cdf0e10cSrcweir             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);
151*cdf0e10cSrcweir             virtual sal_Bool SAL_CALL isElementVisible( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException);
152*cdf0e10cSrcweir             virtual sal_Bool SAL_CALL isElementFloating( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException);
153*cdf0e10cSrcweir             virtual sal_Bool SAL_CALL isElementDocked( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException);
154*cdf0e10cSrcweir             virtual ::sal_Bool SAL_CALL isElementLocked( const ::rtl::OUString& ResourceURL ) throw (::com::sun::star::uno::RuntimeException);
155*cdf0e10cSrcweir             virtual ::com::sun::star::awt::Size SAL_CALL getElementSize( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException);
156*cdf0e10cSrcweir             virtual ::com::sun::star::awt::Point SAL_CALL getElementPos( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException);
157*cdf0e10cSrcweir             virtual void SAL_CALL lock(  ) throw (::com::sun::star::uno::RuntimeException);
158*cdf0e10cSrcweir             virtual void SAL_CALL unlock(  ) throw (::com::sun::star::uno::RuntimeException);
159*cdf0e10cSrcweir             virtual void SAL_CALL doLayout(  ) throw (::com::sun::star::uno::RuntimeException);
160*cdf0e10cSrcweir             virtual void SAL_CALL setVisible( sal_Bool bVisible ) throw (::com::sun::star::uno::RuntimeException);
161*cdf0e10cSrcweir             virtual sal_Bool SAL_CALL isVisible() throw (::com::sun::star::uno::RuntimeException);
162*cdf0e10cSrcweir 
163*cdf0e10cSrcweir             //---------------------------------------------------------------------------------------------------------
164*cdf0e10cSrcweir 		    //	XInplaceLayout
165*cdf0e10cSrcweir 		    //---------------------------------------------------------------------------------------------------------
166*cdf0e10cSrcweir             virtual void SAL_CALL setInplaceMenuBar( sal_Int64 pInplaceMenuBarPointer ) throw (::com::sun::star::uno::RuntimeException);
167*cdf0e10cSrcweir             virtual void SAL_CALL resetInplaceMenuBar(  ) throw (::com::sun::star::uno::RuntimeException);
168*cdf0e10cSrcweir 
169*cdf0e10cSrcweir             //---------------------------------------------------------------------------------------------------------
170*cdf0e10cSrcweir             // XMenuBarMergingAcceptor
171*cdf0e10cSrcweir             //---------------------------------------------------------------------------------------------------------
172*cdf0e10cSrcweir             virtual sal_Bool SAL_CALL setMergedMenuBar( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& xMergedMenuBar )
173*cdf0e10cSrcweir                                                        throw (::com::sun::star::uno::RuntimeException);
174*cdf0e10cSrcweir             virtual void SAL_CALL removeMergedMenuBar(  ) throw (::com::sun::star::uno::RuntimeException);
175*cdf0e10cSrcweir 
176*cdf0e10cSrcweir             //---------------------------------------------------------------------------------------------------------
177*cdf0e10cSrcweir 		    //	XWindowListener
178*cdf0e10cSrcweir 		    //---------------------------------------------------------------------------------------------------------
179*cdf0e10cSrcweir     	    virtual void SAL_CALL windowResized( const css::awt::WindowEvent& aEvent ) throw( css::uno::RuntimeException );
180*cdf0e10cSrcweir     	    virtual void SAL_CALL windowMoved( const css::awt::WindowEvent& aEvent ) throw( css::uno::RuntimeException );
181*cdf0e10cSrcweir             virtual void SAL_CALL windowShown( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException );
182*cdf0e10cSrcweir             virtual void SAL_CALL windowHidden( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException );
183*cdf0e10cSrcweir 
184*cdf0e10cSrcweir             //---------------------------------------------------------------------------------------------------------
185*cdf0e10cSrcweir 		    //	 XFrameActionListener
186*cdf0e10cSrcweir 		    //---------------------------------------------------------------------------------------------------------
187*cdf0e10cSrcweir 		    virtual void SAL_CALL frameAction( const css::frame::FrameActionEvent& aEvent ) throw ( css::uno::RuntimeException );
188*cdf0e10cSrcweir 
189*cdf0e10cSrcweir 		    //---------------------------------------------------------------------------------------------------------
190*cdf0e10cSrcweir             //  XEventListener
191*cdf0e10cSrcweir 		    //---------------------------------------------------------------------------------------------------------
192*cdf0e10cSrcweir             using cppu::OPropertySetHelper::disposing;
193*cdf0e10cSrcweir 	        virtual void SAL_CALL disposing( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException );
194*cdf0e10cSrcweir 
195*cdf0e10cSrcweir 		    //---------------------------------------------------------------------------------------------------------
196*cdf0e10cSrcweir             //  XUIConfigurationListener
197*cdf0e10cSrcweir 		    //---------------------------------------------------------------------------------------------------------
198*cdf0e10cSrcweir             virtual void SAL_CALL elementInserted( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
199*cdf0e10cSrcweir             virtual void SAL_CALL elementRemoved( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
200*cdf0e10cSrcweir             virtual void SAL_CALL elementReplaced( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
201*cdf0e10cSrcweir 
202*cdf0e10cSrcweir 		    //---------------------------------------------------------------------------------------------------------
203*cdf0e10cSrcweir             //  XLayoutManagerEventBroadcaster
204*cdf0e10cSrcweir 		    //---------------------------------------------------------------------------------------------------------
205*cdf0e10cSrcweir             virtual void SAL_CALL addLayoutManagerEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManagerListener >& aLayoutManagerListener ) throw (::com::sun::star::uno::RuntimeException);
206*cdf0e10cSrcweir             virtual void SAL_CALL removeLayoutManagerEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManagerListener >& aLayoutManagerListener ) throw (::com::sun::star::uno::RuntimeException);
207*cdf0e10cSrcweir 
208*cdf0e10cSrcweir             DECL_LINK( MenuBarClose, MenuBar * );
209*cdf0e10cSrcweir 	        DECL_LINK( WindowEventListener, VclSimpleEvent* );
210*cdf0e10cSrcweir 
211*cdf0e10cSrcweir 		    //---------------------------------------------------------------------------------------------------------
212*cdf0e10cSrcweir             //  ILayoutNotifications
213*cdf0e10cSrcweir 		    //---------------------------------------------------------------------------------------------------------
214*cdf0e10cSrcweir             virtual void requestLayout( Hint eHint );
215*cdf0e10cSrcweir 
216*cdf0e10cSrcweir         protected:
217*cdf0e10cSrcweir             DECL_LINK( AsyncLayoutHdl, Timer * );
218*cdf0e10cSrcweir 
219*cdf0e10cSrcweir         private:
220*cdf0e10cSrcweir             //---------------------------------------------------------------------------------------------------------
221*cdf0e10cSrcweir             //  helper
222*cdf0e10cSrcweir 		    //---------------------------------------------------------------------------------------------------------
223*cdf0e10cSrcweir 
224*cdf0e10cSrcweir             //---------------------------------------------------------------------------------------------------------
225*cdf0e10cSrcweir             //  menu bar
226*cdf0e10cSrcweir 		    //---------------------------------------------------------------------------------------------------------
227*cdf0e10cSrcweir             void impl_clearUpMenuBar();
228*cdf0e10cSrcweir             void implts_reset( sal_Bool bAttach );
229*cdf0e10cSrcweir             void implts_setMenuBarCloser(sal_Bool bCloserState);
230*cdf0e10cSrcweir             void implts_updateMenuBarClose();
231*cdf0e10cSrcweir             sal_Bool implts_resetMenuBar();
232*cdf0e10cSrcweir 
233*cdf0e10cSrcweir             //---------------------------------------------------------------------------------------------------------
234*cdf0e10cSrcweir             //  locking
235*cdf0e10cSrcweir 		    //---------------------------------------------------------------------------------------------------------
236*cdf0e10cSrcweir             void implts_lock();
237*cdf0e10cSrcweir             sal_Bool implts_unlock();
238*cdf0e10cSrcweir 
239*cdf0e10cSrcweir             //---------------------------------------------------------------------------------------------------------
240*cdf0e10cSrcweir             //  query
241*cdf0e10cSrcweir 		    //---------------------------------------------------------------------------------------------------------
242*cdf0e10cSrcweir             ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > implts_findElement( const rtl::OUString& aName );
243*cdf0e10cSrcweir             UIElement& impl_findElement( const rtl::OUString& aName );
244*cdf0e10cSrcweir 
245*cdf0e10cSrcweir             void implts_writeNewStateData( const rtl::OUString aName, const ::com::sun::star::uno::Reference< com::sun::star::awt::XWindow >& xWindow );
246*cdf0e10cSrcweir             sal_Bool implts_readWindowStateData( const rtl::OUString& rName, UIElement& rElementData );
247*cdf0e10cSrcweir             void implts_writeWindowStateData( const rtl::OUString& rName, const UIElement& rElementData );
248*cdf0e10cSrcweir             void implts_setElementData( UIElement& rUIElement, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDockableWindow >& rDockWindow );
249*cdf0e10cSrcweir             void implts_sortUIElements();
250*cdf0e10cSrcweir             void implts_destroyElements();
251*cdf0e10cSrcweir             void implts_toggleFloatingUIElementsVisibility( sal_Bool bActive );
252*cdf0e10cSrcweir             void implts_reparentChildWindows();
253*cdf0e10cSrcweir             ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > implts_createDockingWindow( const ::rtl::OUString& aElementName );
254*cdf0e10cSrcweir 
255*cdf0e10cSrcweir             sal_Bool implts_isEmbeddedLayoutManager() const;
256*cdf0e10cSrcweir             sal_Int16 implts_getCurrentSymbolsSize();
257*cdf0e10cSrcweir             sal_Int16 implts_getCurrentSymbolsStyle();
258*cdf0e10cSrcweir             ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > implts_createElement( const rtl::OUString& aName );
259*cdf0e10cSrcweir 
260*cdf0e10cSrcweir             // layouting methods
261*cdf0e10cSrcweir             sal_Bool implts_resizeContainerWindow( const ::com::sun::star::awt::Size& rContainerSize, const ::com::sun::star::awt::Point& rComponentPos );
262*cdf0e10cSrcweir             ::Size  implts_getTopBottomDockingAreaSizes();
263*cdf0e10cSrcweir             ::Size  implts_getContainerWindowOutputSize();
264*cdf0e10cSrcweir 
265*cdf0e10cSrcweir             void implts_setDockingAreaWindowSizes( const css::awt::Rectangle& rBorderSpace );
266*cdf0e10cSrcweir             ::com::sun::star::awt::Rectangle implts_calcDockingAreaSizes();
267*cdf0e10cSrcweir             sal_Bool implts_doLayout( sal_Bool bForceRequestBorderSpace, sal_Bool bOuterResize );
268*cdf0e10cSrcweir             void implts_doLayout_notify( sal_Bool bOuterResize );
269*cdf0e10cSrcweir 
270*cdf0e10cSrcweir             // internal methods to control status/progress bar
271*cdf0e10cSrcweir             ::Size      implts_getStatusBarSize();
272*cdf0e10cSrcweir             void        implts_destroyStatusBar();
273*cdf0e10cSrcweir             void        implts_createStatusBar( const rtl::OUString& rStatusBarName );
274*cdf0e10cSrcweir             void        implts_createProgressBar();
275*cdf0e10cSrcweir             void        implts_destroyProgressBar();
276*cdf0e10cSrcweir             void        implts_setStatusBarPosSize( const ::Point& rPos, const ::Size& rSize );
277*cdf0e10cSrcweir             sal_Bool    implts_showStatusBar( sal_Bool bStoreState=sal_False );
278*cdf0e10cSrcweir             sal_Bool    implts_hideStatusBar( sal_Bool bStoreState=sal_False );
279*cdf0e10cSrcweir             void        implts_readStatusBarState( const rtl::OUString& rStatusBarName );
280*cdf0e10cSrcweir             sal_Bool    implts_showProgressBar();
281*cdf0e10cSrcweir             sal_Bool    implts_hideProgressBar();
282*cdf0e10cSrcweir             void        implts_backupProgressBarWrapper();
283*cdf0e10cSrcweir             void        implts_setOffset( const sal_Int32 nBottomOffset );
284*cdf0e10cSrcweir 
285*cdf0e10cSrcweir 			void 	implts_setInplaceMenuBar(
286*cdf0e10cSrcweir 						const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& xMergedMenuBar )
287*cdf0e10cSrcweir 							throw (::com::sun::star::uno::RuntimeException);
288*cdf0e10cSrcweir 			void	implts_resetInplaceMenuBar()
289*cdf0e10cSrcweir 							throw (::com::sun::star::uno::RuntimeException);
290*cdf0e10cSrcweir 
291*cdf0e10cSrcweir             void    implts_setVisibleState( sal_Bool bShow );
292*cdf0e10cSrcweir             void    implts_updateUIElementsVisibleState( sal_Bool bShow );
293*cdf0e10cSrcweir             void    implts_setCurrentUIVisibility( sal_Bool bShow );
294*cdf0e10cSrcweir             void    implts_notifyListeners( short nEvent, ::com::sun::star::uno::Any aInfoParam );
295*cdf0e10cSrcweir 
296*cdf0e10cSrcweir             DECL_LINK( OptionsChanged, void* );
297*cdf0e10cSrcweir             DECL_LINK( SettingsChanged, void* );
298*cdf0e10cSrcweir 
299*cdf0e10cSrcweir             //---------------------------------------------------------------------------------------------------------
300*cdf0e10cSrcweir 		    //	OPropertySetHelper
301*cdf0e10cSrcweir 		    //---------------------------------------------------------------------------------------------------------
302*cdf0e10cSrcweir             virtual sal_Bool                                            SAL_CALL convertFastPropertyValue        ( com::sun::star::uno::Any&        aConvertedValue ,
303*cdf0e10cSrcweir                                                                                                                 com::sun::star::uno::Any&        aOldValue       ,
304*cdf0e10cSrcweir                                                                                                                 sal_Int32                        nHandle         ,
305*cdf0e10cSrcweir                                                                                                                 const com::sun::star::uno::Any&  aValue          ) throw( com::sun::star::lang::IllegalArgumentException );
306*cdf0e10cSrcweir             virtual void                                                SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32                        nHandle         ,
307*cdf0e10cSrcweir                                                                                                                 const com::sun::star::uno::Any&  aValue          ) throw( com::sun::star::uno::Exception                 );
308*cdf0e10cSrcweir             using cppu::OPropertySetHelper::getFastPropertyValue;
309*cdf0e10cSrcweir             virtual void                                                SAL_CALL getFastPropertyValue( com::sun::star::uno::Any&    aValue          ,
310*cdf0e10cSrcweir                                                                                                     sal_Int32                    nHandle         ) const;
311*cdf0e10cSrcweir             virtual ::cppu::IPropertyArrayHelper&                       SAL_CALL getInfoHelper();
312*cdf0e10cSrcweir             virtual ::com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw (::com::sun::star::uno::RuntimeException);
313*cdf0e10cSrcweir 
314*cdf0e10cSrcweir             css::uno::Reference< css::lang::XMultiServiceFactory >                      m_xSMGR; /** reference to factory, which has created this instance. */
315*cdf0e10cSrcweir             css::uno::Reference< css::util::XURLTransformer >                           m_xURLTransformer;
316*cdf0e10cSrcweir             css::uno::Reference< css::container::XIndexAccess >                         m_xDisplayAccess;
317*cdf0e10cSrcweir             css::uno::Reference< css::frame::XFrame >                                   m_xFrame;
318*cdf0e10cSrcweir             css::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager >        m_xModuleCfgMgr;
319*cdf0e10cSrcweir             css::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager >        m_xDocCfgMgr;
320*cdf0e10cSrcweir             css::uno::WeakReference< css::frame::XModel >                               m_xModel;
321*cdf0e10cSrcweir             css::uno::Reference< css::awt::XWindow >                                    m_xContainerWindow;
322*cdf0e10cSrcweir             css::uno::Reference< css::awt::XTopWindow2 >                                m_xContainerTopWindow;
323*cdf0e10cSrcweir             sal_Int32                                                                   m_nLockCount;
324*cdf0e10cSrcweir             bool                                                                        m_bActive;
325*cdf0e10cSrcweir             bool                                                                        m_bInplaceMenuSet;
326*cdf0e10cSrcweir             bool                                                                        m_bDockingInProgress;
327*cdf0e10cSrcweir             bool                                                                        m_bMenuVisible;
328*cdf0e10cSrcweir             bool                                                                        m_bComponentAttached;
329*cdf0e10cSrcweir             bool                                                                        m_bDoLayout;
330*cdf0e10cSrcweir             bool                                                                        m_bVisible;
331*cdf0e10cSrcweir             bool                                                                        m_bParentWindowVisible;
332*cdf0e10cSrcweir             bool                                                                        m_bMustDoLayout;
333*cdf0e10cSrcweir             bool                                                                        m_bAutomaticToolbars;
334*cdf0e10cSrcweir             bool                                                                        m_bStoreWindowState;
335*cdf0e10cSrcweir             bool                                                                        m_bHideCurrentUI;
336*cdf0e10cSrcweir             bool                                                                        m_bGlobalSettings;
337*cdf0e10cSrcweir             bool                                                                        m_bPreserveContentSize;
338*cdf0e10cSrcweir             bool                                                                        m_bMenuBarCloser;
339*cdf0e10cSrcweir             css::awt::Rectangle                                                         m_aDockingArea;
340*cdf0e10cSrcweir             css::uno::Reference< ::com::sun::star::ui::XDockingAreaAcceptor >           m_xDockingAreaAcceptor;
341*cdf0e10cSrcweir             css::uno::Reference< ::com::sun::star::lang::XComponent >                   m_xInplaceMenuBar;
342*cdf0e10cSrcweir             MenuBarManager*                                                             m_pInplaceMenuBar;
343*cdf0e10cSrcweir             css::uno::Reference< ::com::sun::star::ui::XUIElement >                     m_xMenuBar;
344*cdf0e10cSrcweir             UIElement                                                                   m_aStatusBarElement;
345*cdf0e10cSrcweir             UIElement                                                                   m_aProgressBarElement;
346*cdf0e10cSrcweir             com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement >          m_xProgressBarBackup;
347*cdf0e10cSrcweir             css::uno::Reference< ::com::sun::star::frame::XModuleManager >              m_xModuleManager;
348*cdf0e10cSrcweir             css::uno::Reference< ::com::sun::star::ui::XUIElementFactory >              m_xUIElementFactoryManager;
349*cdf0e10cSrcweir             css::uno::Reference< ::com::sun::star::container::XNameAccess >             m_xPersistentWindowState;
350*cdf0e10cSrcweir             css::uno::Reference< ::com::sun::star::container::XNameAccess >             m_xPersistentWindowStateSupplier;
351*cdf0e10cSrcweir             GlobalSettings*                                                             m_pGlobalSettings;
352*cdf0e10cSrcweir             rtl::OUString                                                               m_aModuleIdentifier;
353*cdf0e10cSrcweir             rtl::OUString                                                               m_aStatusBarAlias;
354*cdf0e10cSrcweir             rtl::OUString                                                               m_aProgressBarAlias;
355*cdf0e10cSrcweir             rtl::OUString                                                               m_aPropDocked;
356*cdf0e10cSrcweir             rtl::OUString                                                               m_aPropVisible;
357*cdf0e10cSrcweir             rtl::OUString                                                               m_aPropDockingArea;
358*cdf0e10cSrcweir             rtl::OUString                                                               m_aPropDockPos;
359*cdf0e10cSrcweir             rtl::OUString                                                               m_aPropPos;
360*cdf0e10cSrcweir             rtl::OUString                                                               m_aPropSize;
361*cdf0e10cSrcweir             rtl::OUString                                                               m_aPropUIName;
362*cdf0e10cSrcweir             rtl::OUString                                                               m_aPropStyle;
363*cdf0e10cSrcweir             rtl::OUString                                                               m_aPropLocked;
364*cdf0e10cSrcweir             rtl::OUString                                                               m_aCustomizeCmd;
365*cdf0e10cSrcweir             sal_Int16                                                                   m_eSymbolsSize;
366*cdf0e10cSrcweir             sal_Int16                                                                   m_eSymbolsStyle;
367*cdf0e10cSrcweir 	    Timer                                                                       m_aAsyncLayoutTimer;
368*cdf0e10cSrcweir             ::cppu::OMultiTypeInterfaceContainerHelper                                  m_aListenerContainer; // container for ALL Listener
369*cdf0e10cSrcweir             PanelManager*                                                               m_pPanelManager;
370*cdf0e10cSrcweir             ToolbarLayoutManager*                                                       m_pToolbarManager;
371*cdf0e10cSrcweir             css::uno::Reference< ::com::sun::star::ui::XUIConfigurationListener >       m_xToolbarManager;
372*cdf0e10cSrcweir     };
373*cdf0e10cSrcweir 
374*cdf0e10cSrcweir } // namespace framework
375*cdf0e10cSrcweir 
376*cdf0e10cSrcweir #endif // __FRAMEWORK_SERVICES_LAYOUTMANAGER_HXX_
377