1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef __FRAMEWORK_UIELEMENT_ADDONSTOOLBARMANAGER_HXX_ 29 #define __FRAMEWORK_UIELEMENT_ADDONSTOOLBARMANAGER_HXX_ 30 31 //_________________________________________________________________________________________________________________ 32 // my own includes 33 //_________________________________________________________________________________________________________________ 34 35 #ifndef __FRAMEWORK_UILEMENT_TOOLBARMANAGER_HXX_ 36 #include <uielement/toolbarmanager.hxx> 37 #endif 38 #include <threadhelp/threadhelpbase.hxx> 39 #include <macros/generic.hxx> 40 #include <macros/xinterface.hxx> 41 #include <macros/xtypeprovider.hxx> 42 43 //_________________________________________________________________________________________________________________ 44 // interface includes 45 //_________________________________________________________________________________________________________________ 46 #include <com/sun/star/frame/XFrame.hpp> 47 #include <com/sun/star/frame/XStatusListener.hpp> 48 #include <com/sun/star/lang/XComponent.hpp> 49 #include <com/sun/star/container/XIndexAccess.hpp> 50 #include <com/sun/star/container/XNameAccess.hpp> 51 #include <com/sun/star/frame/XModuleManager.hpp> 52 #include <com/sun/star/lang/XMultiServiceFactory.hpp> 53 54 //_________________________________________________________________________________________________________________ 55 // other includes 56 //_________________________________________________________________________________________________________________ 57 #include <rtl/ustring.hxx> 58 #include <cppuhelper/weak.hxx> 59 #include <cppuhelper/interfacecontainer.hxx> 60 61 #include <vcl/toolbox.hxx> 62 63 64 namespace framework 65 { 66 67 class ToolBar; 68 class AddonsToolBarManager : public ToolBarManager 69 { 70 public: 71 AddonsToolBarManager( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServicveManager, 72 const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame, 73 const rtl::OUString& rResourceName, 74 ToolBar* pToolBar ); 75 virtual ~AddonsToolBarManager(); 76 77 // XComponent 78 void SAL_CALL dispose() throw ( ::com::sun::star::uno::RuntimeException ); 79 80 virtual void RefreshImages(); 81 using ToolBarManager::FillToolbar; 82 void FillToolbar( const com::sun::star::uno::Sequence< com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > >& rAddonToolbar ); 83 84 protected: 85 DECL_LINK( Click, ToolBox * ); 86 DECL_LINK( DoubleClick, ToolBox * ); 87 DECL_LINK( Command, CommandEvent * ); 88 DECL_LINK( Select, ToolBox * ); 89 DECL_LINK( Highlight, ToolBox * ); 90 DECL_LINK( Activate, ToolBox * ); 91 DECL_LINK( Deactivate, ToolBox * ); 92 DECL_LINK( StateChanged, StateChangedType* ); 93 DECL_LINK( DataChanged, DataChangedEvent* ); 94 95 virtual bool MenuItemAllowed( sal_uInt16 ) const; 96 }; 97 98 } 99 100 #endif // __FRAMEWORK_UIELEMENT_ADDONSTOOLBARMANAGER_HXX_ 101