1f8e07b45SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3f8e07b45SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4f8e07b45SAndrew Rist * or more contributor license agreements. See the NOTICE file 5f8e07b45SAndrew Rist * distributed with this work for additional information 6f8e07b45SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7f8e07b45SAndrew Rist * to you under the Apache License, Version 2.0 (the 8f8e07b45SAndrew Rist * "License"); you may not use this file except in compliance 9f8e07b45SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11f8e07b45SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13f8e07b45SAndrew Rist * Unless required by applicable law or agreed to in writing, 14f8e07b45SAndrew Rist * software distributed under the License is distributed on an 15f8e07b45SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16f8e07b45SAndrew Rist * KIND, either express or implied. See the License for the 17f8e07b45SAndrew Rist * specific language governing permissions and limitations 18f8e07b45SAndrew Rist * under the License. 19cdf0e10cSrcweir * 20f8e07b45SAndrew Rist *************************************************************/ 21f8e07b45SAndrew Rist 22cdf0e10cSrcweir #ifndef __FRAMEWORK_LAYOUTMANAGER_TOOLBARLAYOUTMANAGER_HXX_ 23cdf0e10cSrcweir #define __FRAMEWORK_LAYOUTMANAGER_TOOLBARLAYOUTMANAGER_HXX_ 24cdf0e10cSrcweir 25cdf0e10cSrcweir /** Attention: stl headers must(!) be included at first. Otherwhise it can make trouble 26cdf0e10cSrcweir with solaris headers ... 27cdf0e10cSrcweir */ 28cdf0e10cSrcweir #include <vector> 29cdf0e10cSrcweir 30cdf0e10cSrcweir //_________________________________________________________________________________________________________________ 31cdf0e10cSrcweir // my own includes 32cdf0e10cSrcweir //_________________________________________________________________________________________________________________ 33cdf0e10cSrcweir #include <threadhelp/threadhelpbase.hxx> 34cdf0e10cSrcweir #include <threadhelp/resetableguard.hxx> 35cdf0e10cSrcweir #include <threadhelp/writeguard.hxx> 36cdf0e10cSrcweir #include <threadhelp/readguard.hxx> 37cdf0e10cSrcweir #include <macros/generic.hxx> 38cdf0e10cSrcweir #include <macros/xinterface.hxx> 39cdf0e10cSrcweir #include <macros/xtypeprovider.hxx> 40cdf0e10cSrcweir #include <macros/xserviceinfo.hxx> 41cdf0e10cSrcweir #include <stdtypes.h> 42cdf0e10cSrcweir #include <properties.h> 43cdf0e10cSrcweir #include <stdtypes.h> 44cdf0e10cSrcweir #include <uiconfiguration/globalsettings.hxx> 45cdf0e10cSrcweir #include <uiconfiguration/windowstateconfiguration.hxx> 46cdf0e10cSrcweir #include <framework/addonsoptions.hxx> 47cdf0e10cSrcweir #include <uielement/uielement.hxx> 48cdf0e10cSrcweir #include <helper/ilayoutnotifications.hxx> 49cdf0e10cSrcweir 50cdf0e10cSrcweir //_________________________________________________________________________________________________________________ 51cdf0e10cSrcweir // interface includes 52cdf0e10cSrcweir //_________________________________________________________________________________________________________________ 53cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp> 54cdf0e10cSrcweir #include <com/sun/star/lang/XTypeProvider.hpp> 55cdf0e10cSrcweir #include <com/sun/star/frame/XLayoutManager.hpp> 56cdf0e10cSrcweir #include <com/sun/star/ui/XUIConfigurationManager.hpp> 57cdf0e10cSrcweir #include <com/sun/star/ui/XUIConfiguration.hpp> 58cdf0e10cSrcweir #include <com/sun/star/frame/XModuleManager.hpp> 59cdf0e10cSrcweir #include <com/sun/star/frame/XFrameActionListener.hpp> 60cdf0e10cSrcweir #include <com/sun/star/awt/XWindowListener.hpp> 61cdf0e10cSrcweir #include <com/sun/star/util/XURLTransformer.hpp> 62cdf0e10cSrcweir #include <com/sun/star/ui/XUIElementFactory.hpp> 63cdf0e10cSrcweir #include <com/sun/star/ui/DockingArea.hpp> 64cdf0e10cSrcweir #include <com/sun/star/awt/XTopWindow2.hpp> 65cdf0e10cSrcweir #include <com/sun/star/awt/XWindow2.hpp> 66cdf0e10cSrcweir #include <com/sun/star/awt/XDockableWindow.hpp> 67cdf0e10cSrcweir #include <com/sun/star/awt/XDockableWindowListener.hpp> 68cdf0e10cSrcweir 69cdf0e10cSrcweir //_________________________________________________________________________________________________________________ 70cdf0e10cSrcweir // other includes 71cdf0e10cSrcweir //_________________________________________________________________________________________________________________ 72cdf0e10cSrcweir 73cdf0e10cSrcweir #include <cppuhelper/implbase3.hxx> 74cdf0e10cSrcweir 75cdf0e10cSrcweir 76cdf0e10cSrcweir namespace framework 77cdf0e10cSrcweir { 78cdf0e10cSrcweir 79cdf0e10cSrcweir class ToolbarLayoutManager : public ::cppu::WeakImplHelper3< ::com::sun::star::awt::XDockableWindowListener, 80cdf0e10cSrcweir ::com::sun::star::ui::XUIConfigurationListener, 81cdf0e10cSrcweir ::com::sun::star::awt::XWindowListener >, 82cdf0e10cSrcweir private ThreadHelpBase // Struct for right initalization of mutex member! Must be first of baseclasses. 83cdf0e10cSrcweir { 84cdf0e10cSrcweir public: 85cdf0e10cSrcweir enum { DOCKINGAREAS_COUNT = 4 }; 86cdf0e10cSrcweir 87cdf0e10cSrcweir ToolbarLayoutManager( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xSMGR, 88cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElementFactory >& xUIElementFactory, 89cdf0e10cSrcweir ILayoutNotifications* pParentLayouter ); 90cdf0e10cSrcweir virtual ~ToolbarLayoutManager(); 91cdf0e10cSrcweir 92cdf0e10cSrcweir void reset(); 93cdf0e10cSrcweir void attach( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame, 94cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager >& xModuleCfgMgr, 95cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager >& xDocCfgMgr, 96cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& xPersistentWindowState ); 97cdf0e10cSrcweir 98cdf0e10cSrcweir void setParentWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& xParentWindow ); 99cdf0e10cSrcweir void setDockingAreaOffsets( const ::Rectangle aOffsets ); 100cdf0e10cSrcweir 101cdf0e10cSrcweir void resetDockingArea(); 102cdf0e10cSrcweir 103cdf0e10cSrcweir ::com::sun::star::awt::Rectangle getDockingArea(); 104cdf0e10cSrcweir void setDockingArea( const ::com::sun::star::awt::Rectangle& rDockingArea ); 105cdf0e10cSrcweir 106cdf0e10cSrcweir // layouting 107cdf0e10cSrcweir bool isLayoutDirty(); 108cdf0e10cSrcweir void doLayout(const ::Size& aContainerSize); 109cdf0e10cSrcweir 110cdf0e10cSrcweir // creation/destruction 111cdf0e10cSrcweir void createStaticToolbars(); 112cdf0e10cSrcweir void destroyToolbars(); 113cdf0e10cSrcweir 114cdf0e10cSrcweir bool requestToolbar( const ::rtl::OUString& rResourceURL ); 115cdf0e10cSrcweir bool createToolbar( const ::rtl::OUString& rResourceURL ); 116cdf0e10cSrcweir bool destroyToolbar( const ::rtl::OUString& rResourceURL ); 117cdf0e10cSrcweir 118cdf0e10cSrcweir // visibility 119cdf0e10cSrcweir bool showToolbar( const ::rtl::OUString& rResourceURL ); 120cdf0e10cSrcweir bool hideToolbar( const ::rtl::OUString& rResourceURL ); 121cdf0e10cSrcweir 122cdf0e10cSrcweir void refreshToolbarsVisibility( bool bAutomaticToolbars ); 123cdf0e10cSrcweir void setFloatingToolbarsVisibility( bool bVisible ); 124cdf0e10cSrcweir void setVisible(bool bVisible); isVisible()125cdf0e10cSrcweir bool isVisible() { return m_bVisible; } 126cdf0e10cSrcweir 127cdf0e10cSrcweir // docking and further functions 128cdf0e10cSrcweir bool dockToolbar( const ::rtl::OUString& rResourceURL, ::com::sun::star::ui::DockingArea eDockingArea, const ::com::sun::star::awt::Point& aPos ); 129cdf0e10cSrcweir bool dockAllToolbars(); 130*7658c399Smseidel bool floatToolbar( const ::rtl::OUString& rResourceURL ); 131cdf0e10cSrcweir bool lockToolbar( const ::rtl::OUString& rResourceURL ); 132cdf0e10cSrcweir bool unlockToolbar( const ::rtl::OUString& rResourceURL ); 133cdf0e10cSrcweir void setToolbarPos( const ::rtl::OUString& rResourceURL, const ::com::sun::star::awt::Point& aPos ); 134cdf0e10cSrcweir void setToolbarSize( const ::rtl::OUString& rResourceURL, const ::com::sun::star::awt::Size& aSize ); 135cdf0e10cSrcweir void setToolbarPosSize( const ::rtl::OUString& rResourceURL, const ::com::sun::star::awt::Point& aPos, const ::com::sun::star::awt::Size& aSize ); 136cdf0e10cSrcweir bool isToolbarVisible( const ::rtl::OUString& rResourceURL ); 137cdf0e10cSrcweir bool isToolbarFloating( const ::rtl::OUString& rResourceURL ); 138cdf0e10cSrcweir bool isToolbarDocked( const ::rtl::OUString& rResourceURL ); 139cdf0e10cSrcweir bool isToolbarLocked( const ::rtl::OUString& rResourceURL ); 140cdf0e10cSrcweir ::com::sun::star::awt::Point getToolbarPos( const ::rtl::OUString& rResourceURL ); 141cdf0e10cSrcweir ::com::sun::star::awt::Size getToolbarSize( const ::rtl::OUString& rResourceURL ); 142cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > getToolbar( const ::rtl::OUString& aName ); 143cdf0e10cSrcweir ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > > getToolbars(); 144cdf0e10cSrcweir 145cdf0e10cSrcweir // child window notifications 146cdf0e10cSrcweir long childWindowEvent( VclSimpleEvent* pEvent ); 147cdf0e10cSrcweir 148cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 149cdf0e10cSrcweir // XInterface 150cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 151cdf0e10cSrcweir virtual void SAL_CALL acquire() throw(); 152cdf0e10cSrcweir virtual void SAL_CALL release() throw(); 153cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw( ::com::sun::star::uno::RuntimeException ); 154cdf0e10cSrcweir 155cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 156cdf0e10cSrcweir // XEventListener 157cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 158cdf0e10cSrcweir virtual void SAL_CALL disposing( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ); 159cdf0e10cSrcweir 160cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 161cdf0e10cSrcweir // XWindowListener 162cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 163cdf0e10cSrcweir virtual void SAL_CALL windowResized( const css::awt::WindowEvent& aEvent ) throw( css::uno::RuntimeException ); 164cdf0e10cSrcweir virtual void SAL_CALL windowMoved( const css::awt::WindowEvent& aEvent ) throw( css::uno::RuntimeException ); 165cdf0e10cSrcweir virtual void SAL_CALL windowShown( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ); 166cdf0e10cSrcweir virtual void SAL_CALL windowHidden( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ); 167cdf0e10cSrcweir 168cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 169cdf0e10cSrcweir // XDockableWindowListener 170cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 171cdf0e10cSrcweir virtual void SAL_CALL startDocking( const ::com::sun::star::awt::DockingEvent& e ) throw (::com::sun::star::uno::RuntimeException); 172cdf0e10cSrcweir virtual ::com::sun::star::awt::DockingData SAL_CALL docking( const ::com::sun::star::awt::DockingEvent& e ) throw (::com::sun::star::uno::RuntimeException); 173cdf0e10cSrcweir virtual void SAL_CALL endDocking( const ::com::sun::star::awt::EndDockingEvent& e ) throw (::com::sun::star::uno::RuntimeException); 174cdf0e10cSrcweir virtual sal_Bool SAL_CALL prepareToggleFloatingMode( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException); 175cdf0e10cSrcweir virtual void SAL_CALL toggleFloatingMode( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException); 176cdf0e10cSrcweir virtual void SAL_CALL closed( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException); 177cdf0e10cSrcweir virtual void SAL_CALL endPopupMode( const ::com::sun::star::awt::EndPopupModeEvent& e ) throw (::com::sun::star::uno::RuntimeException); 178cdf0e10cSrcweir 179cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 180cdf0e10cSrcweir // XUIConfigurationListener 181cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 182cdf0e10cSrcweir virtual void SAL_CALL elementInserted( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException); 183cdf0e10cSrcweir virtual void SAL_CALL elementRemoved( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException); 184cdf0e10cSrcweir virtual void SAL_CALL elementReplaced( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException); 185cdf0e10cSrcweir 186cdf0e10cSrcweir private: 187cdf0e10cSrcweir enum DockingOperation 188cdf0e10cSrcweir { 189cdf0e10cSrcweir DOCKOP_BEFORE_COLROW, 190cdf0e10cSrcweir DOCKOP_ON_COLROW, 191cdf0e10cSrcweir DOCKOP_AFTER_COLROW 192cdf0e10cSrcweir }; 193cdf0e10cSrcweir 194cdf0e10cSrcweir typedef std::vector< UIElement > UIElementVector; 195cdf0e10cSrcweir struct SingleRowColumnWindowData 196cdf0e10cSrcweir { SingleRowColumnWindowDataframework::ToolbarLayoutManager::SingleRowColumnWindowData197cdf0e10cSrcweir SingleRowColumnWindowData() : nVarSize( 0 ), nStaticSize( 0 ), nSpace( 0 ) {} 198cdf0e10cSrcweir 199cdf0e10cSrcweir std::vector< rtl::OUString > aUIElementNames; 200cdf0e10cSrcweir std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > > aRowColumnWindows; 201cdf0e10cSrcweir std::vector< ::com::sun::star::awt::Rectangle > aRowColumnWindowSizes; 202cdf0e10cSrcweir std::vector< sal_Int32 > aRowColumnSpace; 203cdf0e10cSrcweir ::com::sun::star::awt::Rectangle aRowColumnRect; 204cdf0e10cSrcweir sal_Int32 nVarSize; 205cdf0e10cSrcweir sal_Int32 nStaticSize; 206cdf0e10cSrcweir sal_Int32 nSpace; 207cdf0e10cSrcweir sal_Int32 nRowColumn; 208cdf0e10cSrcweir }; 209cdf0e10cSrcweir 210cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 211cdf0e10cSrcweir // internal helper methods 212cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 213cdf0e10cSrcweir bool implts_isParentWindowVisible() const; 214cdf0e10cSrcweir ::Rectangle implts_calcDockingArea(); 215cdf0e10cSrcweir void implts_sortUIElements(); 216cdf0e10cSrcweir void implts_reparentToolbars(); 217cdf0e10cSrcweir rtl::OUString implts_generateGenericAddonToolbarTitle( sal_Int32 nNumber ) const; 218cdf0e10cSrcweir void implts_setElementData( UIElement& rUIElement, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDockableWindow >& rDockWindow ); 219cdf0e10cSrcweir void implts_destroyDockingAreaWindows(); 220cdf0e10cSrcweir 221cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 222cdf0e10cSrcweir // layout methods 223cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 224cdf0e10cSrcweir void implts_setDockingAreaWindowSizes( const ::com::sun::star::awt::Rectangle& rBorderSpace ); 225cdf0e10cSrcweir ::Point implts_findNextCascadeFloatingPos(); 226cdf0e10cSrcweir void implts_renumberRowColumnData( ::com::sun::star::ui::DockingArea eDockingArea, DockingOperation eDockingOperation, const UIElement& rUIElement ); 227cdf0e10cSrcweir void implts_calcWindowPosSizeOnSingleRowColumn( sal_Int32 nDockingArea, 228cdf0e10cSrcweir sal_Int32 nOffset, 229cdf0e10cSrcweir SingleRowColumnWindowData& rRowColumnWindowData, 230cdf0e10cSrcweir const ::Size& rContainerSize ); 231cdf0e10cSrcweir void implts_setLayoutDirty(); 232cdf0e10cSrcweir void implts_setLayoutInProgress( bool bInProgress = true ); implts_isLayoutInProgress() const233cdf0e10cSrcweir bool implts_isLayoutInProgress() const { return m_bLayoutInProgress; } 234cdf0e10cSrcweir 235cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 236cdf0e10cSrcweir // lookup/container methods 237cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 238cdf0e10cSrcweir UIElement implts_findToolbar( const rtl::OUString& aName ); 239cdf0e10cSrcweir UIElement implts_findToolbar( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xToolbar ); 240cdf0e10cSrcweir UIElement& impl_findToolbar( const rtl::OUString& aName ); 241cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > implts_getXWindow( const ::rtl::OUString& aName ); 242cdf0e10cSrcweir Window* implts_getWindow( const ::rtl::OUString& aName ); 243cdf0e10cSrcweir bool implts_insertToolbar( const UIElement& rUIElement ); 244cdf0e10cSrcweir void implts_setToolbar( const UIElement& rUIElement ); 245cdf0e10cSrcweir ::Size implts_getTopBottomDockingAreaSizes(); 246cdf0e10cSrcweir void implts_getUIElementVectorCopy( UIElementVector& rCopy ); 247cdf0e10cSrcweir 248cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 249cdf0e10cSrcweir // internal docking methods 250cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 251cdf0e10cSrcweir ::Rectangle implts_calcHotZoneRect( const ::Rectangle& rRect, sal_Int32 nHotZoneOffset ); 252cdf0e10cSrcweir void implts_calcDockingPosSize( UIElement& aUIElement, DockingOperation& eDockOperation, ::Rectangle& rTrackingRect, const Point& rMousePos ); 253cdf0e10cSrcweir DockingOperation implts_determineDockingOperation( ::com::sun::star::ui::DockingArea DockingArea, const ::Rectangle& rRowColRect, const Point& rMousePos ); 254cdf0e10cSrcweir ::Rectangle implts_getWindowRectFromRowColumn( ::com::sun::star::ui::DockingArea DockingArea, const SingleRowColumnWindowData& rRowColumnWindowData, const ::Point& rMousePos, const rtl::OUString& rExcludeElementName ); 255cdf0e10cSrcweir ::Rectangle implts_determineFrontDockingRect( ::com::sun::star::ui::DockingArea eDockingArea, 256cdf0e10cSrcweir sal_Int32 nRowCol, 257cdf0e10cSrcweir const ::Rectangle& rDockedElementRect, 258cdf0e10cSrcweir const ::rtl::OUString& rMovedElementName, 259cdf0e10cSrcweir const ::Rectangle& rMovedElementRect ); 260cdf0e10cSrcweir ::Rectangle implts_calcTrackingAndElementRect( ::com::sun::star::ui::DockingArea eDockingArea, 261cdf0e10cSrcweir sal_Int32 nRowCol, 262cdf0e10cSrcweir UIElement& rUIElement, 263cdf0e10cSrcweir const ::Rectangle& rTrackingRect, 264cdf0e10cSrcweir const ::Rectangle& rRowColumnRect, 265cdf0e10cSrcweir const ::Size& rContainerWinSize ); 266cdf0e10cSrcweir 267cdf0e10cSrcweir void implts_getDockingAreaElementInfos( ::com::sun::star::ui::DockingArea DockingArea, std::vector< SingleRowColumnWindowData >& rRowColumnsWindowData ); 268cdf0e10cSrcweir void implts_getDockingAreaElementInfoOnSingleRowCol( ::com::sun::star::ui::DockingArea, sal_Int32 nRowCol, SingleRowColumnWindowData& rRowColumnWindowData ); 269cdf0e10cSrcweir void implts_findNextDockingPos( ::com::sun::star::ui::DockingArea DockingArea, const ::Size& aUIElementSize, ::Point& rVirtualPos, ::Point& rPixelPos ); 270cdf0e10cSrcweir void implts_setTrackingRect( ::com::sun::star::ui::DockingArea eDockingArea, const ::Point& rMousePos, ::Rectangle& rTrackingRect ); 271cdf0e10cSrcweir 272cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 273cdf0e10cSrcweir // creation methods 274cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 275cdf0e10cSrcweir void implts_createAddonsToolBars(); 276cdf0e10cSrcweir void implts_createCustomToolBars(); 277cdf0e10cSrcweir void implts_createNonContextSensitiveToolBars(); 278cdf0e10cSrcweir void implts_createCustomToolBars( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > >& aCustomTbxSeq ); 279cdf0e10cSrcweir void implts_createCustomToolBar( const rtl::OUString& aTbxResName, const rtl::OUString& aTitle ); 280cdf0e10cSrcweir void implts_createToolBar( const ::rtl::OUString& aName, bool& bNotify, ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement >& rUIElement ); 281cdf0e10cSrcweir css::uno::Reference< css::ui::XUIElement > implts_createElement( const ::rtl::OUString& aName ); 282cdf0e10cSrcweir void implts_setToolbarCreation( bool bStart = true ); 283cdf0e10cSrcweir bool implts_isToolbarCreationActive(); 284cdf0e10cSrcweir 285cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 286cdf0e10cSrcweir // persistence methods 287cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 288cdf0e10cSrcweir sal_Bool implts_readWindowStateData( const rtl::OUString& aName, UIElement& rElementData ); 289cdf0e10cSrcweir void implts_writeWindowStateData( const UIElement& rElementData ); 290cdf0e10cSrcweir void implts_writeNewWindowStateData( const rtl::OUString aName, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& xWindow ); 291cdf0e10cSrcweir 292cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 293cdf0e10cSrcweir // members 294cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------------- 295cdf0e10cSrcweir css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR; 296cdf0e10cSrcweir css::uno::Reference< css::frame::XFrame > m_xFrame; 297cdf0e10cSrcweir css::uno::Reference< css::awt::XWindow2 > m_xContainerWindow; 298cdf0e10cSrcweir css::uno::Reference< css::awt::XWindow > m_xDockAreaWindows[DOCKINGAREAS_COUNT]; 299cdf0e10cSrcweir css::uno::Reference< ::com::sun::star::ui::XUIElementFactory > m_xUIElementFactoryManager; 300cdf0e10cSrcweir css::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager > m_xModuleCfgMgr; 301cdf0e10cSrcweir css::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager > m_xDocCfgMgr; 302cdf0e10cSrcweir css::uno::Reference< ::com::sun::star::awt::XToolkit > m_xToolkit; 303cdf0e10cSrcweir css::uno::Reference< ::com::sun::star::container::XNameAccess > m_xPersistentWindowState; 304cdf0e10cSrcweir ILayoutNotifications* m_pParentLayouter; 305cdf0e10cSrcweir 306cdf0e10cSrcweir UIElementVector m_aUIElements; 307cdf0e10cSrcweir UIElement m_aDockUIElement; 308cdf0e10cSrcweir Point m_aStartDockMousePos; 309cdf0e10cSrcweir Rectangle m_aDockingArea; 310cdf0e10cSrcweir Rectangle m_aDockingAreaOffsets; 311cdf0e10cSrcweir DockingOperation m_eDockOperation; 312cdf0e10cSrcweir 313cdf0e10cSrcweir AddonsOptions* m_pAddonOptions; 314cdf0e10cSrcweir GlobalSettings* m_pGlobalSettings; 315cdf0e10cSrcweir 316cdf0e10cSrcweir bool m_bComponentAttached; 317cdf0e10cSrcweir bool m_bMustLayout; 318cdf0e10cSrcweir bool m_bLayoutDirty; 319cdf0e10cSrcweir bool m_bStoreWindowState; 320cdf0e10cSrcweir bool m_bGlobalSettings; 321cdf0e10cSrcweir bool m_bDockingInProgress; 322cdf0e10cSrcweir bool m_bVisible; 323cdf0e10cSrcweir bool m_bLayoutInProgress; 324cdf0e10cSrcweir bool m_bToolbarCreation; 325cdf0e10cSrcweir 326cdf0e10cSrcweir ::rtl::OUString m_aFullAddonTbxPrefix; 327cdf0e10cSrcweir ::rtl::OUString m_aCustomTbxPrefix; 328cdf0e10cSrcweir ::rtl::OUString m_aCustomizeCmd; 329cdf0e10cSrcweir ::rtl::OUString m_aToolbarTypeString; 330cdf0e10cSrcweir ::rtl::OUString m_aModuleIdentifier; 331cdf0e10cSrcweir }; 332cdf0e10cSrcweir 333cdf0e10cSrcweir } // namespace framework 334cdf0e10cSrcweir 335cdf0e10cSrcweir #endif // __FRAMEWORK_LAYOUTMANAGER_TOOLBARLAYOUTMANAGER_HXX_ 336*7658c399Smseidel 337*7658c399Smseidel /* vim: set noet sw=4 ts=4: */ 338