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