1/*************************************************************************
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3 *
4 * Copyright 2000, 2010 Oracle and/or its affiliates.
5 *
6 * OpenOffice.org - a multi-platform office productivity suite
7 *
8 * This file is part of OpenOffice.org.
9 *
10 * OpenOffice.org is free software: you can redistribute it and/or modify
11 * it under the terms of the GNU Lesser General Public License version 3
12 * only, as published by the Free Software Foundation.
13 *
14 * OpenOffice.org is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 * GNU Lesser General Public License version 3 for more details
18 * (a copy is included in the LICENSE file that accompanied this code).
19 *
20 * You should have received a copy of the GNU Lesser General Public License
21 * version 3 along with OpenOffice.org.  If not, see
22 * <http://www.openoffice.org/license.html>
23 * for a copy of the LGPLv3 License.
24 *
25 ************************************************************************/
26
27#ifndef __com_sun_star_ui_dialogs_XWizardPage_idl__
28#define __com_sun_star_ui_dialogs_XWizardPage_idl__
29
30#include <com/sun/star/awt/XWindow.idl>
31
32//==================================================================================================================
33
34module com { module sun { module star { module ui { module dialogs {
35
36//==================================================================================================================
37
38/** is a single page of a <type>Wizard</type>
39 */
40published interface XWizardPage : ::com::sun::star::lang::XComponent
41{
42    /** provides read-only access to the window of the page
43    */
44    [attribute, readonly]   ::com::sun::star::awt::XWindow  Window;
45
46    /** denotes the ID of the page.
47
48        <p>Within a wizard, no two pages are allowed to have the same ID.</p>
49    */
50    [attribute, readonly]   short PageId;
51
52    /** called when the page is activated
53    */
54    void    activatePage();
55
56    /** is called when the page is about to be left
57
58        <p>An implementation can veto the leave by returning <FALSE/> here. Usually, the decision about this
59        depends on the current state of the page.</p>
60
61        @param Reason
62            is one of the <type>WizardTravelType</type> contants denoting the reason why the page should be
63            committed.
64    */
65    boolean commitPage( [in] short Reason );
66
67    /** determines whether it is allowed to travel to a later page in the wizard
68
69        <p>You should base this decision on the state of the page only, not on a global state of the wizard. Usually,
70        you return <FALSE/> here if and only if not all necessary input on the page has been provided by the user,
71        or the provided input is not valid.</p>
72
73        <p>If checked for validity is expensive, or if you prefer giving your user more detailed feedback on validity
74        than a disabled <code>Next</code> button in the wizard, then move your checks to the <member>commitPage</member>
75        method.</p>
76    */
77    boolean canAdvance();
78};
79
80//==================================================================================================================
81
82}; }; }; }; };
83
84//==================================================================================================================
85
86#endif
87