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 __com_sun_star_ui_dialogs_XWizardPage_idl__
25#define __com_sun_star_ui_dialogs_XWizardPage_idl__
26
27#include <com/sun/star/awt/XWindow.idl>
28
29//==================================================================================================================
30
31module com { module sun { module star { module ui { module dialogs {
32
33//==================================================================================================================
34
35/** is a single page of a <type>Wizard</type>
36 */
37published interface XWizardPage : ::com::sun::star::lang::XComponent
38{
39    /** provides read-only access to the window of the page
40    */
41    [attribute, readonly]   ::com::sun::star::awt::XWindow  Window;
42
43    /** denotes the ID of the page.
44
45        <p>Within a wizard, no two pages are allowed to have the same ID.</p>
46    */
47    [attribute, readonly]   short PageId;
48
49    /** called when the page is activated
50    */
51    void    activatePage();
52
53    /** is called when the page is about to be left
54
55        <p>An implementation can veto the leave by returning <FALSE/> here. Usually, the decision about this
56        depends on the current state of the page.</p>
57
58        @param Reason
59            is one of the <type>WizardTravelType</type> contants denoting the reason why the page should be
60            committed.
61    */
62    boolean commitPage( [in] short Reason );
63
64    /** determines whether it is allowed to travel to a later page in the wizard
65
66        <p>You should base this decision on the state of the page only, not on a global state of the wizard. Usually,
67        you return <FALSE/> here if and only if not all necessary input on the page has been provided by the user,
68        or the provided input is not valid.</p>
69
70        <p>If checked for validity is expensive, or if you prefer giving your user more detailed feedback on validity
71        than a disabled <code>Next</code> button in the wizard, then move your checks to the <member>commitPage</member>
72        method.</p>
73    */
74    boolean canAdvance();
75};
76
77//==================================================================================================================
78
79}; }; }; }; };
80
81//==================================================================================================================
82
83#endif
84