1*2d785d7eSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*2d785d7eSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*2d785d7eSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*2d785d7eSAndrew Rist  * distributed with this work for additional information
6*2d785d7eSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*2d785d7eSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*2d785d7eSAndrew Rist  * "License"); you may not use this file except in compliance
9*2d785d7eSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*2d785d7eSAndrew Rist  *
11*2d785d7eSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*2d785d7eSAndrew Rist  *
13*2d785d7eSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*2d785d7eSAndrew Rist  * software distributed under the License is distributed on an
15*2d785d7eSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*2d785d7eSAndrew Rist  * KIND, either express or implied.  See the License for the
17*2d785d7eSAndrew Rist  * specific language governing permissions and limitations
18*2d785d7eSAndrew Rist  * under the License.
19*2d785d7eSAndrew Rist  *
20*2d785d7eSAndrew Rist  *************************************************************/
21*2d785d7eSAndrew Rist 
22*2d785d7eSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef FORMS_NAVBARCONTROL_HXX
25cdf0e10cSrcweir #define FORMS_NAVBARCONTROL_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include "formnavigation.hxx"
28cdf0e10cSrcweir 
29cdf0e10cSrcweir /** === begin UNO includes === **/
30cdf0e10cSrcweir #include <com/sun/star/frame/XDispatchProviderInterception.hpp>
31cdf0e10cSrcweir #include <com/sun/star/frame/XStatusListener.hpp>
32cdf0e10cSrcweir /** === end UNO includes === **/
33cdf0e10cSrcweir 
34cdf0e10cSrcweir #include <toolkit/controls/unocontrol.hxx>
35cdf0e10cSrcweir #include <toolkit/awt/vclxwindow.hxx>
36cdf0e10cSrcweir #include <comphelper/uno3.hxx>
37cdf0e10cSrcweir #include <cppuhelper/implbase1.hxx>
38cdf0e10cSrcweir #include <tools/wintypes.hxx>
39cdf0e10cSrcweir 
40cdf0e10cSrcweir //.........................................................................
41cdf0e10cSrcweir namespace frm
42cdf0e10cSrcweir {
43cdf0e10cSrcweir //.........................................................................
44cdf0e10cSrcweir 
45cdf0e10cSrcweir     //==================================================================
46cdf0e10cSrcweir     // ONavigationBarControl
47cdf0e10cSrcweir     //==================================================================
48cdf0e10cSrcweir     typedef ::cppu::ImplHelper1 <   ::com::sun::star::frame::XDispatchProviderInterception
49cdf0e10cSrcweir                                 >   ONavigationBarControl_Base;
50cdf0e10cSrcweir 
51cdf0e10cSrcweir     class ONavigationBarControl
52cdf0e10cSrcweir                             :public UnoControl
53cdf0e10cSrcweir                             ,public ONavigationBarControl_Base
54cdf0e10cSrcweir     {
55cdf0e10cSrcweir     public:
56cdf0e10cSrcweir         ONavigationBarControl(
57cdf0e10cSrcweir             const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
58cdf0e10cSrcweir         );
59cdf0e10cSrcweir 
60cdf0e10cSrcweir     protected:
61cdf0e10cSrcweir         ~ONavigationBarControl();
62cdf0e10cSrcweir 
63cdf0e10cSrcweir     public:
64cdf0e10cSrcweir         // XServiceInfo - static version
65cdf0e10cSrcweir         static	::rtl::OUString	SAL_CALL getImplementationName_Static();
66cdf0e10cSrcweir         static	::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames_Static();
67cdf0e10cSrcweir         static	::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL Create( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory );
68cdf0e10cSrcweir 
69cdf0e10cSrcweir     protected:
70cdf0e10cSrcweir         // UNO
71cdf0e10cSrcweir         DECLARE_UNO3_AGG_DEFAULTS( ONavigationBarControl, UnoControl );
72cdf0e10cSrcweir         virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw ( ::com::sun::star::uno::RuntimeException );
73cdf0e10cSrcweir 
74cdf0e10cSrcweir         // XControl
75cdf0e10cSrcweir         virtual void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& _rToolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& _rParent ) throw( ::com::sun::star::uno::RuntimeException );
76cdf0e10cSrcweir 
77cdf0e10cSrcweir         // XServiceInfo
78cdf0e10cSrcweir         virtual ::rtl::OUString	SAL_CALL getImplementationName()  throw(::com::sun::star::uno::RuntimeException);
79cdf0e10cSrcweir         virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()  throw(::com::sun::star::uno::RuntimeException);
80cdf0e10cSrcweir 
81cdf0e10cSrcweir         // XTypeProvider
82cdf0e10cSrcweir         DECLARE_XTYPEPROVIDER()
83cdf0e10cSrcweir 
84cdf0e10cSrcweir         // XVclWindowPeer
85cdf0e10cSrcweir         virtual void SAL_CALL setDesignMode( sal_Bool _bOn ) throw( ::com::sun::star::uno::RuntimeException );
86cdf0e10cSrcweir 
87cdf0e10cSrcweir         // XDispatchProviderInterception
88cdf0e10cSrcweir         virtual void SAL_CALL registerDispatchProviderInterceptor( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor >& Interceptor ) throw (::com::sun::star::uno::RuntimeException);
89cdf0e10cSrcweir         virtual void SAL_CALL releaseDispatchProviderInterceptor( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor >& Interceptor ) throw (::com::sun::star::uno::RuntimeException);
90cdf0e10cSrcweir     };
91cdf0e10cSrcweir 
92cdf0e10cSrcweir     //==================================================================
93cdf0e10cSrcweir     // ONavigationBarPeer
94cdf0e10cSrcweir     //==================================================================
95cdf0e10cSrcweir     class ONavigationBarPeer
96cdf0e10cSrcweir                         :public VCLXWindow
97cdf0e10cSrcweir                         ,public OFormNavigationHelper
98cdf0e10cSrcweir     {
99cdf0e10cSrcweir     public:
100cdf0e10cSrcweir         /** factory method
101cdf0e10cSrcweir             @return
102cdf0e10cSrcweir                 a new ONavigationBarPeer instance, which has been aquired once!
103cdf0e10cSrcweir         */
104cdf0e10cSrcweir         static ONavigationBarPeer* Create(
105cdf0e10cSrcweir             const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
106cdf0e10cSrcweir             Window* _pParentWindow,
107cdf0e10cSrcweir             const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& _rxModel
108cdf0e10cSrcweir         );
109cdf0e10cSrcweir 
110cdf0e10cSrcweir     protected:
111cdf0e10cSrcweir         ONavigationBarPeer(
112cdf0e10cSrcweir             const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
113cdf0e10cSrcweir         );
114cdf0e10cSrcweir         ~ONavigationBarPeer();
115cdf0e10cSrcweir 
116cdf0e10cSrcweir     public:
117cdf0e10cSrcweir         // XInterface
118cdf0e10cSrcweir         DECLARE_XINTERFACE( )
119cdf0e10cSrcweir 
120cdf0e10cSrcweir         // XVclWindowPeer
121cdf0e10cSrcweir         virtual void SAL_CALL setDesignMode( sal_Bool _bOn ) throw( ::com::sun::star::uno::RuntimeException );
122cdf0e10cSrcweir 
123cdf0e10cSrcweir         // XWindow2
124cdf0e10cSrcweir         using VCLXWindow::isEnabled;
125cdf0e10cSrcweir 
126cdf0e10cSrcweir     protected:
127cdf0e10cSrcweir         // XTypeProvider
128cdf0e10cSrcweir         DECLARE_XTYPEPROVIDER( )
129cdf0e10cSrcweir 
130cdf0e10cSrcweir 	    // XComponent
131cdf0e10cSrcweir         void SAL_CALL dispose(  ) throw( ::com::sun::star::uno::RuntimeException );
132cdf0e10cSrcweir 
133cdf0e10cSrcweir 	    // XVclWindowPeer
134cdf0e10cSrcweir         void SAL_CALL setProperty( const ::rtl::OUString& _rPropertyName, const ::com::sun::star::uno::Any& _rValue ) throw( ::com::sun::star::uno::RuntimeException );
135cdf0e10cSrcweir         ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& _rPropertyName ) throw(::com::sun::star::uno::RuntimeException);
136cdf0e10cSrcweir 
137cdf0e10cSrcweir         // XEventListener
138cdf0e10cSrcweir         virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
139cdf0e10cSrcweir 
140cdf0e10cSrcweir         // OFormNavigationHelper overriables
141cdf0e10cSrcweir         virtual void    interceptorsChanged( );
142cdf0e10cSrcweir         virtual void    featureStateChanged( sal_Int16 _nFeatureId, sal_Bool _bEnabled );
143cdf0e10cSrcweir         virtual void    allFeatureStatesChanged( );
144cdf0e10cSrcweir         virtual void    getSupportedFeatures( ::std::vector< sal_Int16 >& /* [out] */ _rFeatureIds );
145cdf0e10cSrcweir 
146cdf0e10cSrcweir         // IFeatureDispatcher overriables
147cdf0e10cSrcweir         virtual bool    isEnabled( sal_Int16 _nFeatureId ) const;
148cdf0e10cSrcweir     };
149cdf0e10cSrcweir 
150cdf0e10cSrcweir //.........................................................................
151cdf0e10cSrcweir }   // namespace frm
152cdf0e10cSrcweir //.........................................................................
153cdf0e10cSrcweir 
154cdf0e10cSrcweir #endif // FORMS_NAVBARCONTROL_HXX
155