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 24 #ifndef SVT_UNO_WIZARD_HXX 25 #define SVT_UNO_WIZARD_HXX 26 27 #include "svtools/genericunodialog.hxx" 28 29 /** === begin UNO includes === **/ 30 #include <com/sun/star/ui/dialogs/XWizard.hpp> 31 #include <com/sun/star/uno/XComponentContext.hpp> 32 #include <com/sun/star/ui/dialogs/XWizardController.hpp> 33 /** === end UNO includes === **/ 34 35 #include <cppuhelper/implbase1.hxx> 36 #include <comphelper/componentcontext.hxx> 37 38 //...................................................................................................................... 39 namespace svt { namespace uno 40 { 41 //...................................................................................................................... 42 43 //================================================================================================================== 44 //= Wizard - declaration 45 //================================================================================================================== 46 typedef ::cppu::ImplInheritanceHelper1 < ::svt::OGenericUnoDialog 47 , ::com::sun::star::ui::dialogs::XWizard 48 > Wizard_Base; 49 class Wizard; 50 typedef ::comphelper::OPropertyArrayUsageHelper< Wizard > Wizard_PBase; 51 class Wizard : public Wizard_Base 52 , public Wizard_PBase 53 { 54 public: 55 Wizard( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& i_rContext ); 56 57 // ::com::sun::star::lang::XServiceInfo - static version 58 static ::rtl::OUString SAL_CALL getImplementationName_static(); 59 static ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames_static(); 60 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 ); 61 62 protected: 63 // ::com::sun::star::lang::XServiceInfo 64 virtual ::rtl::OUString SAL_CALL getImplementationName(); 65 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(); 66 67 // ::com::sun::star::beans::XPropertySet 68 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(); 69 virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); 70 71 // OPropertyArrayUsageHelper 72 virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const; 73 74 // ::com::sun::star::ui::dialogs::XWizard 75 virtual ::rtl::OUString SAL_CALL getHelpURL(); 76 virtual void SAL_CALL setHelpURL( const ::rtl::OUString& _helpurl ); 77 virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL getDialogWindow(); 78 virtual ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardPage > SAL_CALL getCurrentPage( ); 79 virtual void SAL_CALL enableButton( ::sal_Int16 WizardButton, ::sal_Bool Enable ); 80 virtual void SAL_CALL setDefaultButton( ::sal_Int16 WizardButton ); 81 virtual ::sal_Bool SAL_CALL travelNext( ); 82 virtual ::sal_Bool SAL_CALL travelPrevious( ); 83 virtual void SAL_CALL enablePage( ::sal_Int16 PageID, ::sal_Bool Enable ); 84 virtual void SAL_CALL updateTravelUI( ); 85 virtual ::sal_Bool SAL_CALL advanceTo( ::sal_Int16 PageId ); 86 virtual ::sal_Bool SAL_CALL goBackTo( ::sal_Int16 PageId ); 87 virtual void SAL_CALL activatePath( ::sal_Int16 PathIndex, ::sal_Bool Final ); 88 89 // ::com::sun::star::ui::dialogs::XExecutableDialog 90 virtual void SAL_CALL setTitle( const ::rtl::OUString& aTitle ); 91 virtual ::sal_Int16 SAL_CALL execute( ); 92 93 // ::com::sun::star::lang::XInitialization 94 virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ); 95 96 protected: 97 ~Wizard(); 98 99 protected: 100 virtual Dialog* createDialog( Window* _pParent ); 101 virtual void destroyDialog(); 102 103 private: 104 ::comphelper::ComponentContext m_aContext; 105 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< sal_Int16 > > m_aWizardSteps; 106 ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardController > m_xController; 107 ::rtl::OUString m_sHelpURL; 108 }; 109 110 //...................................................................................................................... 111 } } // namespace svt::uno 112 //...................................................................................................................... 113 114 #endif // SVT_UNO_WIZARD_HXX 115