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 #ifndef __FRAMEWORK_UIELEMENT_GENERICSTATUSBARCONTROLLER_HXX_ 23 #define __FRAMEWORK_UIELEMENT_GENERICSTATUSBARCONTROLLER_HXX_ 24 25 #include <svtools/statusbarcontroller.hxx> 26 27 #include <com/sun/star/graphic/XGraphic.hpp> 28 29 namespace framework 30 { 31 32 struct AddonStatusbarItemData; 33 34 class GenericStatusbarController : public svt::StatusbarController 35 { 36 public: 37 GenericStatusbarController( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager, 38 const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame, 39 const com::sun::star::uno::Reference< com::sun::star::ui::XStatusbarItem >& rxItem, 40 AddonStatusbarItemData *pItemData ); 41 virtual ~GenericStatusbarController(); 42 43 // XComponent 44 virtual void SAL_CALL dispose() throw ( ::com::sun::star::uno::RuntimeException ); 45 // XStatusListener 46 virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ); 47 48 virtual void SAL_CALL paint( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics >& xGraphics, 49 const ::com::sun::star::awt::Rectangle& rOutputRectangle, 50 ::sal_Int32 nStyle ) throw (::com::sun::star::uno::RuntimeException); 51 52 protected: 53 sal_Bool m_bEnabled; 54 sal_Bool m_bOwnerDraw; 55 AddonStatusbarItemData *m_pItemData; 56 ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > m_xGraphic; 57 }; 58 59 } 60 61 #endif 62