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_LAYOUTMANAGER_TOOLBARLAYOUTMANAGER_HXX_ 25cdf0e10cSrcweir #define __FRAMEWORK_LAYOUTMANAGER_TOOLBARLAYOUTMANAGER_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 <uiconfiguration/globalsettings.hxx> 47cdf0e10cSrcweir #include <uiconfiguration/windowstateconfiguration.hxx> 48cdf0e10cSrcweir #include <framework/addonsoptions.hxx> 49cdf0e10cSrcweir #include <uielement/uielement.hxx> 50cdf0e10cSrcweir #include <helper/ilayoutnotifications.hxx> 51cdf0e10cSrcweir 52cdf0e10cSrcweir //_________________________________________________________________________________________________________________ 53cdf0e10cSrcweir // interface includes 54cdf0e10cSrcweir //_________________________________________________________________________________________________________________ 55cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp> 56cdf0e10cSrcweir #include <com/sun/star/lang/XTypeProvider.hpp> 57cdf0e10cSrcweir #include <com/sun/star/frame/XLayoutManager.hpp> 58cdf0e10cSrcweir #include <com/sun/star/ui/XUIConfigurationManager.hpp> 59cdf0e10cSrcweir #include <com/sun/star/ui/XUIConfiguration.hpp> 60cdf0e10cSrcweir #include <com/sun/star/frame/XModuleManager.hpp> 61cdf0e10cSrcweir #include <com/sun/star/frame/XFrameActionListener.hpp> 62cdf0e10cSrcweir #include <com/sun/star/awt/XWindowListener.hpp> 63cdf0e10cSrcweir #include <com/sun/star/util/XURLTransformer.hpp> 64cdf0e10cSrcweir #include <com/sun/star/ui/XUIElementFactory.hpp> 65cdf0e10cSrcweir #include <com/sun/star/ui/DockingArea.hpp> 66cdf0e10cSrcweir #include <com/sun/star/awt/XTopWindow2.hpp> 67cdf0e10cSrcweir #include <com/sun/star/awt/XWindow2.hpp> 68cdf0e10cSrcweir #include <com/sun/star/awt/XDockableWindow.hpp> 69cdf0e10cSrcweir #include <com/sun/star/awt/XDockableWindowListener.hpp> 70cdf0e10cSrcweir 71cdf0e10cSrcweir //_________________________________________________________________________________________________________________ 72cdf0e10cSrcweir // other includes 73cdf0e10cSrcweir //_________________________________________________________________________________________________________________ 74cdf0e10cSrcweir 75cdf0e10cSrcweir #include <cppuhelper/implbase3.hxx> 76cdf0e10cSrcweir 77cdf0e10cSrcweir 78cdf0e10cSrcweir namespace framework 79cdf0e10cSrcweir { 80cdf0e10cSrcweir 81cdf0e10cSrcweir class ToolbarLayoutManager : public ::cppu::WeakImplHelper3< ::com::sun::star::awt::XDockableWindowListener, 82cdf0e10cSrcweir ::com::sun::star::ui::XUIConfigurationListener, 83cdf0e10cSrcweir ::com::sun::star::awt::XWindowListener >, 84cdf0e10cSrcweir private ThreadHelpBase // Struct for right initalization of mutex member! Must be first of baseclasses. 85cdf0e10cSrcweir { 86cdf0e10cSrcweir public: 87cdf0e10cSrcweir enum { DOCKINGAREAS_COUNT = 4 }; 88cdf0e10cSrcweir 89cdf0e10cSrcweir ToolbarLayoutManager( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xSMGR, 90cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElementFactory >& xUIElementFactory, 91cdf0e10cSrcweir ILayoutNotifications* pParentLayouter ); 92cdf0e10cSrcweir virtual ~ToolbarLayoutManager(); 93cdf0e10cSrcweir 94cdf0e10cSrcweir void reset(); 95cdf0e10cSrcweir void attach( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame, 96cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager >& xModuleCfgMgr, 97cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager >& xDocCfgMgr, 98cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& xPersistentWindowState ); 99cdf0e10cSrcweir 100cdf0e10cSrcweir void setParentWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& xParentWindow ); 101cdf0e10cSrcweir void setDockingAreaOffsets( const ::Rectangle aOffsets ); 102cdf0e10cSrcweir 103cdf0e10cSrcweir void resetDockingArea(); 104cdf0e10cSrcweir 105cdf0e10cSrcweir ::com::sun::star::awt::Rectangle getDockingArea(); 106cdf0e10cSrcweir void setDockingArea( const ::com::sun::star::awt::Rectangle& rDockingArea ); 107cdf0e10cSrcweir 108cdf0e10cSrcweir // layouting 109cdf0e10cSrcweir bool isLayoutDirty(); 110cdf0e10cSrcweir void doLayout(const ::Size& aContainerSize); 111cdf0e10cSrcweir 112cdf0e10cSrcweir // creation/destruction 113cdf0e10cSrcweir void createStaticToolbars(); 114cdf0e10cSrcweir void destroyToolbars(); 115cdf0e10cSrcweir 116cdf0e10cSrcweir bool requestToolbar( const ::rtl::OUString& rResourceURL ); 117cdf0e10cSrcweir bool createToolbar( const ::rtl::OUString& rResourceURL ); 118cdf0e10cSrcweir bool destroyToolbar( const ::rtl::OUString& rResourceURL ); 119cdf0e10cSrcweir 120cdf0e10cSrcweir // visibility 121cdf0e10cSrcweir bool showToolbar( const ::rtl::OUString& rResourceURL ); 122cdf0e10cSrcweir bool hideToolbar( const ::rtl::OUString& rResourceURL ); 123cdf0e10cSrcweir 124cdf0e10cSrcweir void refreshToolbarsVisibility( bool bAutomaticToolbars ); 125cdf0e10cSrcweir void setFloatingToolbarsVisibility( bool bVisible ); 126cdf0e10cSrcweir void setVisible(bool bVisible); isVisible()127cdf0e10cSrcweir bool isVisible() { return m_bVisible; } 128cdf0e10cSrcweir 129cdf0e10cSrcweir // docking and further functions 130cdf0e10cSrcweir bool dockToolbar( const ::rtl::OUString& rResourceURL, ::com::sun::star::ui::DockingArea eDockingArea, const ::com::sun::star::awt::Point& aPos ); 131cdf0e10cSrcweir bool dockAllToolbars(); 132cdf0e10cSrcweir bool floatToolbar( const ::rtl::OUString& rResoureURL ); 133cdf0e10cSrcweir bool lockToolbar( const ::rtl::OUString& rResourceURL ); 134cdf0e10cSrcweir bool unlockToolbar( const ::rtl::OUString& rResourceURL ); 135cdf0e10cSrcweir void setToolbarPos( const ::rtl::OUString& rResourceURL, const ::com::sun::star::awt::Point& aPos ); 136cdf0e10cSrcweir void setToolbarSize( const ::rtl::OUString& rResourceURL, const ::com::sun::star::awt::Size& aSize ); 137cdf0e10cSrcweir void setToolbarPosSize( const ::rtl::OUString& rResourceURL, const ::com::sun::star::awt::Point& aPos, const ::com::sun::star::awt::Size& aSize ); 138cdf0e10cSrcweir bool isToolbarVisible( const ::rtl::OUString& rResourceURL ); 139cdf0e10cSrcweir bool isToolbarFloating( const ::rtl::OUString& rResourceURL ); 140cdf0e10cSrcweir bool isToolbarDocked( const ::rtl::OUString& rResourceURL ); 141cdf0e10cSrcweir bool isToolbarLocked( const ::rtl::OUString& rResourceURL ); 142cdf0e10cSrcweir ::com::sun::star::awt::Point getToolbarPos( const ::rtl::OUString& rResourceURL ); 143cdf0e10cSrcweir ::com::sun::star::awt::Size getToolbarSize( const ::rtl::OUString& rResourceURL ); 144cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > getToolbar( const ::rtl::OUString& aName ); 145cdf0e10cSrcweir ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > > getToolbars(); 146cdf0e10cSrcweir 147cdf0e10cSrcweir // child window notifications 148cdf0e10cSrcweir long childWindowEvent( VclSimpleEvent* pEvent ); 149cdf0e10cSrcweir 150cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 151cdf0e10cSrcweir // XInterface 152cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 153cdf0e10cSrcweir virtual void SAL_CALL acquire() throw(); 154cdf0e10cSrcweir virtual void SAL_CALL release() throw(); 155cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw( ::com::sun::star::uno::RuntimeException ); 156cdf0e10cSrcweir 157cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 158cdf0e10cSrcweir // XEventListener 159cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 160cdf0e10cSrcweir virtual void SAL_CALL disposing( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ); 161cdf0e10cSrcweir 162cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 163cdf0e10cSrcweir // XWindowListener 164cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 165cdf0e10cSrcweir virtual void SAL_CALL windowResized( const css::awt::WindowEvent& aEvent ) throw( css::uno::RuntimeException ); 166cdf0e10cSrcweir virtual void SAL_CALL windowMoved( const css::awt::WindowEvent& aEvent ) throw( css::uno::RuntimeException ); 167cdf0e10cSrcweir virtual void SAL_CALL windowShown( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ); 168cdf0e10cSrcweir virtual void SAL_CALL windowHidden( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ); 169cdf0e10cSrcweir 170cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 171cdf0e10cSrcweir // XDockableWindowListener 172cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 173cdf0e10cSrcweir virtual void SAL_CALL startDocking( const ::com::sun::star::awt::DockingEvent& e ) throw (::com::sun::star::uno::RuntimeException); 174cdf0e10cSrcweir virtual ::com::sun::star::awt::DockingData SAL_CALL docking( const ::com::sun::star::awt::DockingEvent& e ) throw (::com::sun::star::uno::RuntimeException); 175cdf0e10cSrcweir virtual void SAL_CALL endDocking( const ::com::sun::star::awt::EndDockingEvent& e ) throw (::com::sun::star::uno::RuntimeException); 176cdf0e10cSrcweir virtual sal_Bool SAL_CALL prepareToggleFloatingMode( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException); 177cdf0e10cSrcweir virtual void SAL_CALL toggleFloatingMode( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException); 178cdf0e10cSrcweir virtual void SAL_CALL closed( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException); 179cdf0e10cSrcweir virtual void SAL_CALL endPopupMode( const ::com::sun::star::awt::EndPopupModeEvent& e ) throw (::com::sun::star::uno::RuntimeException); 180cdf0e10cSrcweir 181cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 182cdf0e10cSrcweir // XUIConfigurationListener 183cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 184cdf0e10cSrcweir virtual void SAL_CALL elementInserted( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException); 185cdf0e10cSrcweir virtual void SAL_CALL elementRemoved( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException); 186cdf0e10cSrcweir virtual void SAL_CALL elementReplaced( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException); 187cdf0e10cSrcweir 188cdf0e10cSrcweir private: 189cdf0e10cSrcweir enum DockingOperation 190cdf0e10cSrcweir { 191cdf0e10cSrcweir DOCKOP_BEFORE_COLROW, 192cdf0e10cSrcweir DOCKOP_ON_COLROW, 193cdf0e10cSrcweir DOCKOP_AFTER_COLROW 194cdf0e10cSrcweir }; 195cdf0e10cSrcweir 196cdf0e10cSrcweir typedef std::vector< UIElement > UIElementVector; 197cdf0e10cSrcweir struct SingleRowColumnWindowData 198cdf0e10cSrcweir { SingleRowColumnWindowDataframework::ToolbarLayoutManager::SingleRowColumnWindowData199cdf0e10cSrcweir SingleRowColumnWindowData() : nVarSize( 0 ), nStaticSize( 0 ), nSpace( 0 ) {} 200cdf0e10cSrcweir 201cdf0e10cSrcweir std::vector< rtl::OUString > aUIElementNames; 202cdf0e10cSrcweir std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > > aRowColumnWindows; 203cdf0e10cSrcweir std::vector< ::com::sun::star::awt::Rectangle > aRowColumnWindowSizes; 204cdf0e10cSrcweir std::vector< sal_Int32 > aRowColumnSpace; 205cdf0e10cSrcweir ::com::sun::star::awt::Rectangle aRowColumnRect; 206cdf0e10cSrcweir sal_Int32 nVarSize; 207cdf0e10cSrcweir sal_Int32 nStaticSize; 208cdf0e10cSrcweir sal_Int32 nSpace; 209cdf0e10cSrcweir sal_Int32 nRowColumn; 210cdf0e10cSrcweir }; 211cdf0e10cSrcweir 212cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 213cdf0e10cSrcweir // internal helper methods 214cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 215cdf0e10cSrcweir bool implts_isParentWindowVisible() const; 216cdf0e10cSrcweir ::Rectangle implts_calcDockingArea(); 217cdf0e10cSrcweir void implts_sortUIElements(); 218cdf0e10cSrcweir void implts_reparentToolbars(); 219cdf0e10cSrcweir rtl::OUString implts_generateGenericAddonToolbarTitle( sal_Int32 nNumber ) const; 220cdf0e10cSrcweir void implts_setElementData( UIElement& rUIElement, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDockableWindow >& rDockWindow ); 221cdf0e10cSrcweir void implts_destroyDockingAreaWindows(); 222cdf0e10cSrcweir 223cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 224cdf0e10cSrcweir // layout methods 225cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 226cdf0e10cSrcweir void implts_setDockingAreaWindowSizes( const ::com::sun::star::awt::Rectangle& rBorderSpace ); 227cdf0e10cSrcweir ::Point implts_findNextCascadeFloatingPos(); 228cdf0e10cSrcweir void implts_renumberRowColumnData( ::com::sun::star::ui::DockingArea eDockingArea, DockingOperation eDockingOperation, const UIElement& rUIElement ); 229cdf0e10cSrcweir void implts_calcWindowPosSizeOnSingleRowColumn( sal_Int32 nDockingArea, 230cdf0e10cSrcweir sal_Int32 nOffset, 231cdf0e10cSrcweir SingleRowColumnWindowData& rRowColumnWindowData, 232cdf0e10cSrcweir const ::Size& rContainerSize ); 233cdf0e10cSrcweir void implts_setLayoutDirty(); 234cdf0e10cSrcweir void implts_setLayoutInProgress( bool bInProgress = true ); implts_isLayoutInProgress() const235cdf0e10cSrcweir bool implts_isLayoutInProgress() const { return m_bLayoutInProgress; } 236cdf0e10cSrcweir 237cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 238cdf0e10cSrcweir // lookup/container methods 239cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 240cdf0e10cSrcweir UIElement implts_findToolbar( const rtl::OUString& aName ); 241cdf0e10cSrcweir UIElement implts_findToolbar( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xToolbar ); 242cdf0e10cSrcweir UIElement& impl_findToolbar( const rtl::OUString& aName ); 243cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > implts_getXWindow( const ::rtl::OUString& aName ); 244cdf0e10cSrcweir Window* implts_getWindow( const ::rtl::OUString& aName ); 245cdf0e10cSrcweir bool implts_insertToolbar( const UIElement& rUIElement ); 246cdf0e10cSrcweir void implts_setToolbar( const UIElement& rUIElement ); 247cdf0e10cSrcweir ::Size implts_getTopBottomDockingAreaSizes(); 248cdf0e10cSrcweir void implts_getUIElementVectorCopy( UIElementVector& rCopy ); 249cdf0e10cSrcweir 250cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 251cdf0e10cSrcweir // internal docking methods 252cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 253cdf0e10cSrcweir ::Rectangle implts_calcHotZoneRect( const ::Rectangle& rRect, sal_Int32 nHotZoneOffset ); 254cdf0e10cSrcweir void implts_calcDockingPosSize( UIElement& aUIElement, DockingOperation& eDockOperation, ::Rectangle& rTrackingRect, const Point& rMousePos ); 255cdf0e10cSrcweir DockingOperation implts_determineDockingOperation( ::com::sun::star::ui::DockingArea DockingArea, const ::Rectangle& rRowColRect, const Point& rMousePos ); 256cdf0e10cSrcweir ::Rectangle implts_getWindowRectFromRowColumn( ::com::sun::star::ui::DockingArea DockingArea, const SingleRowColumnWindowData& rRowColumnWindowData, const ::Point& rMousePos, const rtl::OUString& rExcludeElementName ); 257cdf0e10cSrcweir ::Rectangle implts_determineFrontDockingRect( ::com::sun::star::ui::DockingArea eDockingArea, 258cdf0e10cSrcweir sal_Int32 nRowCol, 259cdf0e10cSrcweir const ::Rectangle& rDockedElementRect, 260cdf0e10cSrcweir const ::rtl::OUString& rMovedElementName, 261cdf0e10cSrcweir const ::Rectangle& rMovedElementRect ); 262cdf0e10cSrcweir ::Rectangle implts_calcTrackingAndElementRect( ::com::sun::star::ui::DockingArea eDockingArea, 263cdf0e10cSrcweir sal_Int32 nRowCol, 264cdf0e10cSrcweir UIElement& rUIElement, 265cdf0e10cSrcweir const ::Rectangle& rTrackingRect, 266cdf0e10cSrcweir const ::Rectangle& rRowColumnRect, 267cdf0e10cSrcweir const ::Size& rContainerWinSize ); 268cdf0e10cSrcweir 269cdf0e10cSrcweir void implts_getDockingAreaElementInfos( ::com::sun::star::ui::DockingArea DockingArea, std::vector< SingleRowColumnWindowData >& rRowColumnsWindowData ); 270cdf0e10cSrcweir void implts_getDockingAreaElementInfoOnSingleRowCol( ::com::sun::star::ui::DockingArea, sal_Int32 nRowCol, SingleRowColumnWindowData& rRowColumnWindowData ); 271cdf0e10cSrcweir void implts_findNextDockingPos( ::com::sun::star::ui::DockingArea DockingArea, const ::Size& aUIElementSize, ::Point& rVirtualPos, ::Point& rPixelPos ); 272cdf0e10cSrcweir void implts_setTrackingRect( ::com::sun::star::ui::DockingArea eDockingArea, const ::Point& rMousePos, ::Rectangle& rTrackingRect ); 273cdf0e10cSrcweir 274cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 275cdf0e10cSrcweir // creation methods 276cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 277cdf0e10cSrcweir void implts_createAddonsToolBars(); 278cdf0e10cSrcweir void implts_createCustomToolBars(); 279cdf0e10cSrcweir void implts_createNonContextSensitiveToolBars(); 280cdf0e10cSrcweir void implts_createCustomToolBars( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > >& aCustomTbxSeq ); 281cdf0e10cSrcweir void implts_createCustomToolBar( const rtl::OUString& aTbxResName, const rtl::OUString& aTitle ); 282cdf0e10cSrcweir void implts_createToolBar( const ::rtl::OUString& aName, bool& bNotify, ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement >& rUIElement ); 283cdf0e10cSrcweir css::uno::Reference< css::ui::XUIElement > implts_createElement( const ::rtl::OUString& aName ); 284cdf0e10cSrcweir void implts_setToolbarCreation( bool bStart = true ); 285cdf0e10cSrcweir bool implts_isToolbarCreationActive(); 286cdf0e10cSrcweir 287cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 288cdf0e10cSrcweir // persistence methods 289cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 290cdf0e10cSrcweir sal_Bool implts_readWindowStateData( const rtl::OUString& aName, UIElement& rElementData ); 291cdf0e10cSrcweir void implts_writeWindowStateData( const UIElement& rElementData ); 292cdf0e10cSrcweir void implts_writeNewWindowStateData( const rtl::OUString aName, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& xWindow ); 293cdf0e10cSrcweir 294cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 295cdf0e10cSrcweir // members 296cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 297cdf0e10cSrcweir css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR; 298cdf0e10cSrcweir css::uno::Reference< css::frame::XFrame > m_xFrame; 299cdf0e10cSrcweir css::uno::Reference< css::awt::XWindow2 > m_xContainerWindow; 300cdf0e10cSrcweir css::uno::Reference< css::awt::XWindow > m_xDockAreaWindows[DOCKINGAREAS_COUNT]; 301cdf0e10cSrcweir css::uno::Reference< ::com::sun::star::ui::XUIElementFactory > m_xUIElementFactoryManager; 302cdf0e10cSrcweir css::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager > m_xModuleCfgMgr; 303cdf0e10cSrcweir css::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager > m_xDocCfgMgr; 304cdf0e10cSrcweir css::uno::Reference< ::com::sun::star::awt::XToolkit > m_xToolkit; 305cdf0e10cSrcweir css::uno::Reference< ::com::sun::star::container::XNameAccess > m_xPersistentWindowState; 306cdf0e10cSrcweir ILayoutNotifications* m_pParentLayouter; 307cdf0e10cSrcweir 308cdf0e10cSrcweir UIElementVector m_aUIElements; 309cdf0e10cSrcweir UIElement m_aDockUIElement; 310cdf0e10cSrcweir Point m_aStartDockMousePos; 311cdf0e10cSrcweir Rectangle m_aDockingArea; 312cdf0e10cSrcweir Rectangle m_aDockingAreaOffsets; 313cdf0e10cSrcweir DockingOperation m_eDockOperation; 314cdf0e10cSrcweir 315cdf0e10cSrcweir AddonsOptions* m_pAddonOptions; 316cdf0e10cSrcweir GlobalSettings* m_pGlobalSettings; 317cdf0e10cSrcweir 318cdf0e10cSrcweir bool m_bComponentAttached; 319cdf0e10cSrcweir bool m_bMustLayout; 320cdf0e10cSrcweir bool m_bLayoutDirty; 321cdf0e10cSrcweir bool m_bStoreWindowState; 322cdf0e10cSrcweir bool m_bGlobalSettings; 323cdf0e10cSrcweir bool m_bDockingInProgress; 324cdf0e10cSrcweir bool m_bVisible; 325cdf0e10cSrcweir bool m_bLayoutInProgress; 326cdf0e10cSrcweir bool m_bToolbarCreation; 327cdf0e10cSrcweir 328cdf0e10cSrcweir ::rtl::OUString m_aFullAddonTbxPrefix; 329cdf0e10cSrcweir ::rtl::OUString m_aCustomTbxPrefix; 330cdf0e10cSrcweir ::rtl::OUString m_aCustomizeCmd; 331cdf0e10cSrcweir ::rtl::OUString m_aToolbarTypeString; 332cdf0e10cSrcweir ::rtl::OUString m_aModuleIdentifier; 333cdf0e10cSrcweir }; 334cdf0e10cSrcweir 335cdf0e10cSrcweir } // namespace framework 336cdf0e10cSrcweir 337cdf0e10cSrcweir #endif // __FRAMEWORK_LAYOUTMANAGER_TOOLBARLAYOUTMANAGER_HXX_ 338