1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef __FRAMEWORK_UIELEMENT_ADDONSTOOLBARMANAGER_HXX_ 25 #define __FRAMEWORK_UIELEMENT_ADDONSTOOLBARMANAGER_HXX_ 26 27 //_________________________________________________________________________________________________________________ 28 // my own includes 29 //_________________________________________________________________________________________________________________ 30 31 #ifndef __FRAMEWORK_UILEMENT_TOOLBARMANAGER_HXX_ 32 #include <uielement/toolbarmanager.hxx> 33 #endif 34 #include <threadhelp/threadhelpbase.hxx> 35 #include <macros/generic.hxx> 36 #include <macros/xinterface.hxx> 37 #include <macros/xtypeprovider.hxx> 38 39 //_________________________________________________________________________________________________________________ 40 // interface includes 41 //_________________________________________________________________________________________________________________ 42 #include <com/sun/star/frame/XFrame.hpp> 43 #include <com/sun/star/frame/XStatusListener.hpp> 44 #include <com/sun/star/lang/XComponent.hpp> 45 #include <com/sun/star/container/XIndexAccess.hpp> 46 #include <com/sun/star/container/XNameAccess.hpp> 47 #include <com/sun/star/frame/XModuleManager.hpp> 48 #include <com/sun/star/lang/XMultiServiceFactory.hpp> 49 50 //_________________________________________________________________________________________________________________ 51 // other includes 52 //_________________________________________________________________________________________________________________ 53 #include <rtl/ustring.hxx> 54 #include <cppuhelper/weak.hxx> 55 #include <cppuhelper/interfacecontainer.hxx> 56 57 #include <vcl/toolbox.hxx> 58 59 60 namespace framework 61 { 62 63 class ToolBar; 64 class AddonsToolBarManager : public ToolBarManager 65 { 66 public: 67 AddonsToolBarManager( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServicveManager, 68 const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame, 69 const rtl::OUString& rResourceName, 70 ToolBar* pToolBar ); 71 virtual ~AddonsToolBarManager(); 72 73 // XComponent 74 void SAL_CALL dispose() throw ( ::com::sun::star::uno::RuntimeException ); 75 76 virtual void RefreshImages(); 77 using ToolBarManager::FillToolbar; 78 void FillToolbar( const com::sun::star::uno::Sequence< com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > >& rAddonToolbar ); 79 80 protected: 81 DECL_LINK( Click, ToolBox * ); 82 DECL_LINK( DoubleClick, ToolBox * ); 83 DECL_LINK( Command, CommandEvent * ); 84 DECL_LINK( Select, ToolBox * ); 85 DECL_LINK( Highlight, ToolBox * ); 86 DECL_LINK( Activate, ToolBox * ); 87 DECL_LINK( Deactivate, ToolBox * ); 88 DECL_LINK( StateChanged, StateChangedType* ); 89 DECL_LINK( DataChanged, DataChangedEvent* ); 90 91 virtual bool MenuItemAllowed( sal_uInt16 ) const; 92 }; 93 94 } 95 96 #endif // __FRAMEWORK_UIELEMENT_ADDONSTOOLBARMANAGER_HXX_ 97