]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/wizpage.tex
correction for Mac OS compilation
[wxWidgets.git] / docs / latex / wx / wizpage.tex
CommitLineData
f6bcfd97
BP
1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2%% Name: wizpage.tex
3%% Purpose: wxWizardPage and wxWizardPageSimple classes documentation
4%% Author: Vadim Zeitlin
5%% Modified by:
6%% Created: 02.04.00
7%% RCS-ID: $Id$
8%% Copyright: (c) Vadim Zeitlin
9%% License: wxWindows license
10%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
12\section{\class{wxWizardPage}}\label{wxwizardpage}
13
14wxWizardPage is one of the screens in \helpref{wxWizard}{wxwizard}: it must
15know what are the following and preceding pages (which may be {\tt NULL} for the
16first/last page). Except for this extra knowledge, wxWizardPage is just a
17panel, so the controls may be placed directly on it in the usual way.
18
19This class allows to decide what is the orde fo pages in the wizard
20dynamically (during run-time) and so providex maximal flexibility. Usually,
21however, the order of pages is known in advance in which case
22\helpref{wxWizardPageSimple}{wxwizardpagesimple} class is enough and it is simpler
23to use.
24
25\wxheading{Virtual functions to override}
26
27To use this class, you must override \helpref{GetPrev}{wxwizardpagegetprev}
28and \helpref{GetNext}{wxwizardpagegetnext} pure virtual functions (or you
29may use \helpref{wxWizardPageSimple}{wxwizardpagesimple} instead).
30
31\helpref{GetBitmap}{wxwizardpagegetbitmap} can also be overridden, but this
32should be very rarely needed.
33
34\wxheading{Derived from}
35
36\helpref{wxPanel}{wxpanel}\\
37\helpref{wxWindow}{wxwindow}\\
38\helpref{wxEvtHandler}{wxevthandler}\\
39\helpref{wxObject}{wxobject}
40
41\wxheading{Include files}
42
43<wx/wizard.h>
44
45\wxheading{See also}
46
47\helpref{wxWizard}{wxwizard}, \helpref{wxWizard sample}{samplewizard}
48
49\latexignore{\rtfignore{\wxheading{Members}}}
50
51\membersection{wxWizardPage::wxWizardPage}\label{wxwizardpagewxwizardpage}
52
53\func{}{wxWizardPage}{\param{wxWizard* }{parent}, \param{const wxBitmap\& }{bitmap = wxNullBitmap}}
54
55Constructor accepts an optional bitmap which will be used for this page
56instead of the default one for this wizard (note that all bitmaps used should
57be of the same size). Notice that no other parameters are needed because the
58wizard will resize and reposition the page anyhow.
59
60\membersection{wxWizardPage::GetPrev}\label{wxwizardpagegetprev}
61
62\constfunc{wxWizardPage*}{GetPrev}{\void}
63
64Get the page which should be shown when the user chooses the {\tt "Back"}
65button: if {\tt NULL} is returned, this button will be disabled. The first
66page of the wizard will usually return {\tt NULL} from here, but the others
67will not.
68
69\wxheading{See also}
70
71\helpref{GetNext}{wxwizardpagegetnext}
72
73\membersection{wxWizardPage::GetNext}\label{wxwizardpagegetnext}
74
75\constfunc{wxWizardPage*}{GetNext}{\void}
76
77Get the page which should be shown when the user chooses the {\tt "Next"}
78button: if {\tt NULL} is returned, this button will be disabled. The last
79page of the wizard will usually return {\tt NULL} from here, but the others
80will not.
81
82\wxheading{See also}
83
84\helpref{GetPrev}{wxwizardpagegetprev}
85
86\membersection{wxWizardPage::GetBitmap}\label{wxwizardpagegetbitmap}
87
88\constfunc{wxBitmap}{GetBitmap}{\void}
89
90This method is called by wxWizard to get the bitmap to display alongside the
91page. By default, {\tt m\_bitmap} member variable which was set in the
92\helpref{constructor}{wxwizardpagewxwizardpage}.
93
94If the bitmap was not explicitly set (i.e. if {\tt wxNullBitmap} is returned),
95the default bitmap for the wizard should be used.
96
97The only cases when you would want to override this function is if the page
98bitmap depends dynamically on the user choices, i.e. almost never.
99
100%%%%%%%%%%%%%%%%%%%%%%%%%%%%% wxWizardPageSimple %%%%%%%%%%%%%%%%%%%%%%%%%%%%
101
102\section{\class{wxWizardPageSimple}}\label{wxwizardpagesimple}
103
104wxWizardPageSimple is the simplest possible
105\helpref{wxWizardPage}{wxwizardpage} implementation: it just returns the
106pointers given to its constructor from GetNext() and GetPrev() functions.
107
108This makes it very easy to use the obejcts of this class in the wizards where
109the pages order is known statically - on the other hand, if this is not the
110case you must derive your own class from \helpref{wxWizardPage}{wxwizardpage}
111instead.
112
113\wxheading{Derived from}
114
115\helpref{wxWizardPage}{wxwizardpage}\\
116\helpref{wxPanel}{wxpanel}\\
117\helpref{wxWindow}{wxwindow}\\
118\helpref{wxEvtHandler}{wxevthandler}\\
119\helpref{wxObject}{wxobject}
120
121\wxheading{Include files}
122
123<wx/wizard.h>
124
125\wxheading{See also}
126
127\helpref{wxWizard}{wxwizard}, \helpref{wxWizard sample}{samplewizard}
128
129\latexignore{\rtfignore{\wxheading{Members}}}
130
131\membersection{wxWizardPageSimple::wxWizardPageSimple}\label{wxwizardpagesimplewxwizardpagesimple}
132
133\func{}{wxWizardPageSimple}{\param{wxWizard* }{parent = NULL}, \param{wxWizardPage* }{prev = NULL}, \param{wxWizardPage* }{next = NULL}}
134
135Constructor takes the previous and next pages. They may be modified later by
136\helpref{SetPrev()}{wxwizardpagesimplesetprev} or
137\helpref{SetNext()}{wxwizardpagesimplesetnext}.
138
139\membersection{wxWizardPageSimple::SetPrev}\label{wxwizardpagesimplesetprev}
140
141\func{void}{SetPrev}{\param{wxWizardPage* }{prev}}
142
143Sets the previous page.
144
145\membersection{wxWizardPageSimple::SetNext}\label{wxwizardpagesimplesetnext}
146
147\func{void}{SetNext}{\param{wxWizardPage* }{next}}
148
149Sets the next page.
150
151\membersection{wxWizardPageSimple::Chain}\label{wxwizardpagesimplechain}
152
153\func{static void}{Chain}{\param{wxWizardPageSimple* }{first}, \param{wxWizardPageSimple* }{second}}
154
155A convenience function to make the pages follow each other.
156
157Example:
158\begin{verbatim}
159 wxRadioboxPage *page3 = new wxRadioboxPage(wizard);
160 wxValidationPage *page4 = new wxValidationPage(wizard);
161
162 wxWizardPageSimple::Chain(page3, page4);
163\end{verbatim}
164