Updated core
[LibreOffice.git] / svtools / source / uno / unowizard.hxx
blob4ec9a4798a34f9d0ef95397166bbb47c5af47ba4
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef SVT_UNO_WIZARD_HXX
21 #define SVT_UNO_WIZARD_HXX
23 #include "svtools/genericunodialog.hxx"
25 #include <com/sun/star/ui/dialogs/XWizard.hpp>
26 #include <com/sun/star/uno/XComponentContext.hpp>
27 #include <com/sun/star/ui/dialogs/XWizardController.hpp>
29 #include <cppuhelper/implbase1.hxx>
30 #include <comphelper/componentcontext.hxx>
32 //......................................................................................................................
33 namespace svt { namespace uno
35 //......................................................................................................................
37 //==================================================================================================================
38 //= Wizard - declaration
39 //==================================================================================================================
40 typedef ::cppu::ImplInheritanceHelper1 < ::svt::OGenericUnoDialog
41 , ::com::sun::star::ui::dialogs::XWizard
42 > Wizard_Base;
43 class Wizard;
44 typedef ::comphelper::OPropertyArrayUsageHelper< Wizard > Wizard_PBase;
45 class Wizard : public Wizard_Base
46 , public Wizard_PBase
48 public:
49 Wizard( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& i_rContext );
51 // ::com::sun::star::lang::XServiceInfo - static version
52 static OUString SAL_CALL getImplementationName_static() throw(::com::sun::star::uno::RuntimeException);
53 static ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames_static() throw(::com::sun::star::uno::RuntimeException);
54 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 );
56 protected:
57 // ::com::sun::star::lang::XServiceInfo
58 virtual OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
59 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
61 // ::com::sun::star::beans::XPropertySet
62 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException);
63 virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
65 // OPropertyArrayUsageHelper
66 virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
68 // ::com::sun::star::ui::dialogs::XWizard
69 virtual OUString SAL_CALL getHelpURL() throw (::com::sun::star::uno::RuntimeException);
70 virtual void SAL_CALL setHelpURL( const OUString& _helpurl ) throw (::com::sun::star::uno::RuntimeException);
71 virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL getDialogWindow() throw (::com::sun::star::uno::RuntimeException);
72 virtual ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardPage > SAL_CALL getCurrentPage( ) throw (::com::sun::star::uno::RuntimeException);
73 virtual void SAL_CALL enableButton( ::sal_Int16 WizardButton, ::sal_Bool Enable ) throw (::com::sun::star::uno::RuntimeException);
74 virtual void SAL_CALL setDefaultButton( ::sal_Int16 WizardButton ) throw (::com::sun::star::uno::RuntimeException);
75 virtual ::sal_Bool SAL_CALL travelNext( ) throw (::com::sun::star::uno::RuntimeException);
76 virtual ::sal_Bool SAL_CALL travelPrevious( ) throw (::com::sun::star::uno::RuntimeException);
77 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);
78 virtual void SAL_CALL updateTravelUI( ) throw (::com::sun::star::uno::RuntimeException);
79 virtual ::sal_Bool SAL_CALL advanceTo( ::sal_Int16 PageId ) throw (::com::sun::star::uno::RuntimeException);
80 virtual ::sal_Bool SAL_CALL goBackTo( ::sal_Int16 PageId ) throw (::com::sun::star::uno::RuntimeException);
81 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);
83 // ::com::sun::star::ui::dialogs::XExecutableDialog
84 virtual void SAL_CALL setTitle( const OUString& aTitle ) throw (::com::sun::star::uno::RuntimeException);
85 virtual ::sal_Int16 SAL_CALL execute( ) throw (::com::sun::star::uno::RuntimeException);
87 // ::com::sun::star::lang::XInitialization
88 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);
90 protected:
91 ~Wizard();
93 protected:
94 virtual Dialog* createDialog( Window* _pParent );
95 virtual void destroyDialog();
97 private:
98 ::comphelper::ComponentContext m_aContext;
99 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< sal_Int16 > > m_aWizardSteps;
100 ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardController > m_xController;
101 OUString m_sHelpURL;
104 //......................................................................................................................
105 } } // namespace svt::uno
106 //......................................................................................................................
108 #endif // SVT_UNO_WIZARD_HXX
110 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */