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