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 #ifndef RPTUI_STATUSBARCONTROLLER_HXX 24 #define RPTUI_STATUSBARCONTROLLER_HXX 25 26 #include <svtools/statusbarcontroller.hxx> 27 #include <comphelper/uno3.hxx> 28 #include <com/sun/star/lang/XServiceInfo.hpp> 29 #include <cppuhelper/implbase1.hxx> 30 31 class SfxStatusBarControl; 32 namespace rptui 33 { 34 typedef com::sun::star::uno::Reference< com::sun::star::frame::XStatusbarController > TStatusbarRef; 35 36 typedef ::cppu::ImplHelper1 < ::com::sun::star::lang::XServiceInfo> OStatusbarController_BASE; 37 class OStatusbarController : public ::svt::StatusbarController, 38 public OStatusbarController_BASE 39 { 40 TStatusbarRef m_rController; 41 sal_uInt16 m_nSlotId; 42 sal_uInt16 m_nId; 43 public: 44 OStatusbarController(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB); 45 46 static ::rtl::OUString getImplementationName_Static() throw( ::com::sun::star::uno::RuntimeException ); 47 static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException ); 48 static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL 49 create(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xContext); 50 51 private: 52 void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException); 53 // XInterface 54 DECLARE_XINTERFACE( ) 55 // XServiceInfo 56 virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException); 57 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); 58 // need by registration 59 60 virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException); 61 62 // XInitialization 63 virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); 64 65 // XUpdatable 66 virtual void SAL_CALL update() throw (::com::sun::star::uno::RuntimeException); 67 68 // XStatusListener 69 virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ); 70 71 // XStatusbarController 72 virtual ::sal_Bool SAL_CALL mouseButtonDown( const ::com::sun::star::awt::MouseEvent& aMouseEvent ) throw (::com::sun::star::uno::RuntimeException); 73 virtual ::sal_Bool SAL_CALL mouseMove( const ::com::sun::star::awt::MouseEvent& aMouseEvent ) throw (::com::sun::star::uno::RuntimeException); 74 virtual ::sal_Bool SAL_CALL mouseButtonUp( const ::com::sun::star::awt::MouseEvent& aMouseEvent ) throw (::com::sun::star::uno::RuntimeException); 75 virtual void SAL_CALL command( const ::com::sun::star::awt::Point& aPos, 76 ::sal_Int32 nCommand, 77 ::sal_Bool bMouseEvent, 78 const ::com::sun::star::uno::Any& aData ) throw (::com::sun::star::uno::RuntimeException); 79 virtual void SAL_CALL paint( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics >& xGraphics, 80 const ::com::sun::star::awt::Rectangle& rOutputRectangle, 81 ::sal_Int32 nStyle ) throw (::com::sun::star::uno::RuntimeException); 82 virtual void SAL_CALL click( const ::com::sun::star::awt::Point& aPos ) throw (::com::sun::star::uno::RuntimeException); 83 virtual void SAL_CALL doubleClick( const ::com::sun::star::awt::Point& aPos ) throw (::com::sun::star::uno::RuntimeException); 84 }; 85 } 86 #endif // DBAUI_STATUSBARCONTROLLER_HXX 87 88