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