xref: /trunk/main/reportdesign/source/ui/inc/statusbarcontroller.hxx (revision 91144cd0085a7583d2099b982122deb2184ab956)
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();
47         static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void);
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();
53         // XInterface
54         DECLARE_XINTERFACE( )
55         // XServiceInfo
56         virtual ::rtl::OUString SAL_CALL getImplementationName();
57         virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL getSupportedServiceNames();
58         // need by registration
59 
60         virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName );
61 
62         // XInitialization
63         virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments );
64 
65         // XUpdatable
66         virtual void SAL_CALL update();
67 
68         // XStatusListener
69         virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event );
70 
71         // XStatusbarController
72         virtual ::sal_Bool SAL_CALL mouseButtonDown( const ::com::sun::star::awt::MouseEvent& aMouseEvent );
73         virtual ::sal_Bool SAL_CALL mouseMove( const ::com::sun::star::awt::MouseEvent& aMouseEvent );
74         virtual ::sal_Bool SAL_CALL mouseButtonUp( const ::com::sun::star::awt::MouseEvent& aMouseEvent );
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 );
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 );
82         virtual void SAL_CALL click( const ::com::sun::star::awt::Point& aPos );
83         virtual void SAL_CALL doubleClick( const ::com::sun::star::awt::Point& aPos );
84     };
85 }
86 #endif // DBAUI_STATUSBARCONTROLLER_HXX
87