xref: /aoo41x/main/svtools/source/uno/unowizard.hxx (revision 01aa44aa)
1*01aa44aaSAndrew Rist /**************************************************************
2*01aa44aaSAndrew Rist  *
3*01aa44aaSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*01aa44aaSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*01aa44aaSAndrew Rist  * distributed with this work for additional information
6*01aa44aaSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*01aa44aaSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*01aa44aaSAndrew Rist  * "License"); you may not use this file except in compliance
9*01aa44aaSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*01aa44aaSAndrew Rist  *
11*01aa44aaSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*01aa44aaSAndrew Rist  *
13*01aa44aaSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*01aa44aaSAndrew Rist  * software distributed under the License is distributed on an
15*01aa44aaSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*01aa44aaSAndrew Rist  * KIND, either express or implied.  See the License for the
17*01aa44aaSAndrew Rist  * specific language governing permissions and limitations
18*01aa44aaSAndrew Rist  * under the License.
19*01aa44aaSAndrew Rist  *
20*01aa44aaSAndrew Rist  *************************************************************/
21*01aa44aaSAndrew Rist 
22*01aa44aaSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef SVT_UNO_WIZARD_HXX
25cdf0e10cSrcweir #define SVT_UNO_WIZARD_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include "svtools/genericunodialog.hxx"
28cdf0e10cSrcweir 
29cdf0e10cSrcweir /** === begin UNO includes === **/
30cdf0e10cSrcweir #include <com/sun/star/ui/dialogs/XWizard.hpp>
31cdf0e10cSrcweir #include <com/sun/star/uno/XComponentContext.hpp>
32cdf0e10cSrcweir #include <com/sun/star/ui/dialogs/XWizardController.hpp>
33cdf0e10cSrcweir /** === end UNO includes === **/
34cdf0e10cSrcweir 
35cdf0e10cSrcweir #include <cppuhelper/implbase1.hxx>
36cdf0e10cSrcweir #include <comphelper/componentcontext.hxx>
37cdf0e10cSrcweir 
38cdf0e10cSrcweir //......................................................................................................................
39cdf0e10cSrcweir namespace svt { namespace uno
40cdf0e10cSrcweir {
41cdf0e10cSrcweir //......................................................................................................................
42cdf0e10cSrcweir 
43cdf0e10cSrcweir 	//==================================================================================================================
44cdf0e10cSrcweir 	//= Wizard - declaration
45cdf0e10cSrcweir 	//==================================================================================================================
46cdf0e10cSrcweir     typedef ::cppu::ImplInheritanceHelper1  <   ::svt::OGenericUnoDialog
47cdf0e10cSrcweir                                             ,   ::com::sun::star::ui::dialogs::XWizard
48cdf0e10cSrcweir                                             >   Wizard_Base;
49cdf0e10cSrcweir     class Wizard;
50cdf0e10cSrcweir     typedef ::comphelper::OPropertyArrayUsageHelper< Wizard >  Wizard_PBase;
51cdf0e10cSrcweir     class Wizard    : public Wizard_Base
52cdf0e10cSrcweir                     , public Wizard_PBase
53cdf0e10cSrcweir     {
54cdf0e10cSrcweir     public:
55cdf0e10cSrcweir         Wizard( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& i_rContext );
56cdf0e10cSrcweir 
57cdf0e10cSrcweir 		// ::com::sun::star::lang::XServiceInfo - static version
58cdf0e10cSrcweir 		static ::rtl::OUString SAL_CALL getImplementationName_static() throw(::com::sun::star::uno::RuntimeException);
59cdf0e10cSrcweir         static ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames_static() throw(::com::sun::star::uno::RuntimeException);
60cdf0e10cSrcweir         static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL Create( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& i_rContext );
61cdf0e10cSrcweir 
62cdf0e10cSrcweir     protected:
63cdf0e10cSrcweir         // ::com::sun::star::lang::XServiceInfo
64cdf0e10cSrcweir 		virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
65cdf0e10cSrcweir         virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
66cdf0e10cSrcweir 
67cdf0e10cSrcweir         // ::com::sun::star::beans::XPropertySet
68cdf0e10cSrcweir 	    virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >  SAL_CALL getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException);
69cdf0e10cSrcweir 	    virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
70cdf0e10cSrcweir 
71cdf0e10cSrcweir 	    // OPropertyArrayUsageHelper
72cdf0e10cSrcweir 	    virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
73cdf0e10cSrcweir 
74cdf0e10cSrcweir         // ::com::sun::star::ui::dialogs::XWizard
75cdf0e10cSrcweir         virtual ::rtl::OUString SAL_CALL getHelpURL() throw (::com::sun::star::uno::RuntimeException);
76cdf0e10cSrcweir         virtual void SAL_CALL setHelpURL( const ::rtl::OUString& _helpurl ) throw (::com::sun::star::uno::RuntimeException);
77cdf0e10cSrcweir         virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL getDialogWindow() throw (::com::sun::star::uno::RuntimeException);
78cdf0e10cSrcweir         virtual ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardPage > SAL_CALL getCurrentPage(  ) throw (::com::sun::star::uno::RuntimeException);
79cdf0e10cSrcweir         virtual void SAL_CALL enableButton( ::sal_Int16 WizardButton, ::sal_Bool Enable ) throw (::com::sun::star::uno::RuntimeException);
80cdf0e10cSrcweir         virtual void SAL_CALL setDefaultButton( ::sal_Int16 WizardButton ) throw (::com::sun::star::uno::RuntimeException);
81cdf0e10cSrcweir         virtual ::sal_Bool SAL_CALL travelNext(  ) throw (::com::sun::star::uno::RuntimeException);
82cdf0e10cSrcweir         virtual ::sal_Bool SAL_CALL travelPrevious(  ) throw (::com::sun::star::uno::RuntimeException);
83cdf0e10cSrcweir         virtual void SAL_CALL enablePage( ::sal_Int16 PageID, ::sal_Bool Enable ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::util::InvalidStateException, ::com::sun::star::uno::RuntimeException);
84cdf0e10cSrcweir         virtual void SAL_CALL updateTravelUI(  ) throw (::com::sun::star::uno::RuntimeException);
85cdf0e10cSrcweir         virtual ::sal_Bool SAL_CALL advanceTo( ::sal_Int16 PageId ) throw (::com::sun::star::uno::RuntimeException);
86cdf0e10cSrcweir         virtual ::sal_Bool SAL_CALL goBackTo( ::sal_Int16 PageId ) throw (::com::sun::star::uno::RuntimeException);
87cdf0e10cSrcweir         virtual void SAL_CALL activatePath( ::sal_Int16 PathIndex, ::sal_Bool Final ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::util::InvalidStateException, ::com::sun::star::uno::RuntimeException);
88cdf0e10cSrcweir 
89cdf0e10cSrcweir         // ::com::sun::star::ui::dialogs::XExecutableDialog
90cdf0e10cSrcweir         virtual void SAL_CALL setTitle( const ::rtl::OUString& aTitle ) throw (::com::sun::star::uno::RuntimeException);
91cdf0e10cSrcweir         virtual ::sal_Int16 SAL_CALL execute(  ) throw (::com::sun::star::uno::RuntimeException);
92cdf0e10cSrcweir 
93cdf0e10cSrcweir         // ::com::sun::star::lang::XInitialization
94cdf0e10cSrcweir         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);
95cdf0e10cSrcweir 
96cdf0e10cSrcweir    protected:
97cdf0e10cSrcweir         ~Wizard();
98cdf0e10cSrcweir 
99cdf0e10cSrcweir     protected:
100cdf0e10cSrcweir 		virtual Dialog*	createDialog( Window* _pParent );
101cdf0e10cSrcweir 	    virtual void destroyDialog();
102cdf0e10cSrcweir 
103cdf0e10cSrcweir     private:
104cdf0e10cSrcweir         ::comphelper::ComponentContext                                                          m_aContext;
105cdf0e10cSrcweir         ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< sal_Int16 > >         m_aWizardSteps;
106cdf0e10cSrcweir         ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardController >    m_xController;
107cdf0e10cSrcweir         ::rtl::OUString                                                                         m_sHelpURL;
108cdf0e10cSrcweir     };
109cdf0e10cSrcweir 
110cdf0e10cSrcweir //......................................................................................................................
111cdf0e10cSrcweir } } // namespace svt::uno
112cdf0e10cSrcweir //......................................................................................................................
113cdf0e10cSrcweir 
114cdf0e10cSrcweir #endif // SVT_UNO_WIZARD_HXX
115