]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/wizpage.tex
fixed TeX error introduced in rev 48093 (sorry)
[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
8795498c 9%% License: wxWindows license
f6bcfd97
BP
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
decb3a6a
JS
19This class allows the programmer to decide the order of pages in the wizard
20dynamically (during run-time) and so provides maximal flexibility. Usually,
f6bcfd97
BP
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
a7af285d
VZ
45\wxheading{Library}
46
47\helpref{wxAdv}{librarieslist}
48
f6bcfd97
BP
49\wxheading{See also}
50
51\helpref{wxWizard}{wxwizard}, \helpref{wxWizard sample}{samplewizard}
52
53\latexignore{\rtfignore{\wxheading{Members}}}
54
55\membersection{wxWizardPage::wxWizardPage}\label{wxwizardpagewxwizardpage}
56
cf63f3d3 57\func{}{wxWizardPage}{\param{wxWizard* }{parent}, \param{const wxBitmap\& }{bitmap = wxNullBitmap}}
f6bcfd97
BP
58
59Constructor accepts an optional bitmap which will be used for this page
60instead of the default one for this wizard (note that all bitmaps used should
61be of the same size). Notice that no other parameters are needed because the
62wizard will resize and reposition the page anyhow.
63
a0a48a3f
VZ
64\wxheading{Parameters}
65
66\docparam{parent}{The parent wizard}
67
68\docparam{bitmap}{The page-specific bitmap if different from the global one}
69
a0a48a3f 70
f6bcfd97
BP
71\membersection{wxWizardPage::GetPrev}\label{wxwizardpagegetprev}
72
73\constfunc{wxWizardPage*}{GetPrev}{\void}
74
75Get the page which should be shown when the user chooses the {\tt "Back"}
76button: if {\tt NULL} is returned, this button will be disabled. The first
77page of the wizard will usually return {\tt NULL} from here, but the others
78will not.
79
80\wxheading{See also}
81
82\helpref{GetNext}{wxwizardpagegetnext}
83
84\membersection{wxWizardPage::GetNext}\label{wxwizardpagegetnext}
85
86\constfunc{wxWizardPage*}{GetNext}{\void}
87
88Get the page which should be shown when the user chooses the {\tt "Next"}
89button: if {\tt NULL} is returned, this button will be disabled. The last
90page of the wizard will usually return {\tt NULL} from here, but the others
91will not.
92
93\wxheading{See also}
94
95\helpref{GetPrev}{wxwizardpagegetprev}
96
97\membersection{wxWizardPage::GetBitmap}\label{wxwizardpagegetbitmap}
98
99\constfunc{wxBitmap}{GetBitmap}{\void}
100
101This method is called by wxWizard to get the bitmap to display alongside the
102page. By default, {\tt m\_bitmap} member variable which was set in the
103\helpref{constructor}{wxwizardpagewxwizardpage}.
104
105If the bitmap was not explicitly set (i.e. if {\tt wxNullBitmap} is returned),
106the default bitmap for the wizard should be used.
107
108The only cases when you would want to override this function is if the page
109bitmap depends dynamically on the user choices, i.e. almost never.
110
111%%%%%%%%%%%%%%%%%%%%%%%%%%%%% wxWizardPageSimple %%%%%%%%%%%%%%%%%%%%%%%%%%%%
112
113\section{\class{wxWizardPageSimple}}\label{wxwizardpagesimple}
114
115wxWizardPageSimple is the simplest possible
116\helpref{wxWizardPage}{wxwizardpage} implementation: it just returns the
117pointers given to its constructor from GetNext() and GetPrev() functions.
118
2edb0bde 119This makes it very easy to use the objects of this class in the wizards where
f6bcfd97
BP
120the pages order is known statically - on the other hand, if this is not the
121case you must derive your own class from \helpref{wxWizardPage}{wxwizardpage}
122instead.
123
124\wxheading{Derived from}
125
126\helpref{wxWizardPage}{wxwizardpage}\\
127\helpref{wxPanel}{wxpanel}\\
128\helpref{wxWindow}{wxwindow}\\
129\helpref{wxEvtHandler}{wxevthandler}\\
130\helpref{wxObject}{wxobject}
131
132\wxheading{Include files}
133
134<wx/wizard.h>
135
a7af285d
VZ
136\wxheading{Library}
137
138\helpref{wxAdv}{librarieslist}
139
f6bcfd97
BP
140\wxheading{See also}
141
142\helpref{wxWizard}{wxwizard}, \helpref{wxWizard sample}{samplewizard}
143
144\latexignore{\rtfignore{\wxheading{Members}}}
145
146\membersection{wxWizardPageSimple::wxWizardPageSimple}\label{wxwizardpagesimplewxwizardpagesimple}
147
ae500232 148\func{}{wxWizardPageSimple}{\param{wxWizard* }{parent = NULL}, \param{wxWizardPage* }{prev = NULL}, \param{wxWizardPage* }{next = NULL},
e119d049 149\param{const wxBitmap\& }{bitmap = wxNullBitmap}}
f6bcfd97
BP
150
151Constructor takes the previous and next pages. They may be modified later by
152\helpref{SetPrev()}{wxwizardpagesimplesetprev} or
153\helpref{SetNext()}{wxwizardpagesimplesetnext}.
154
155\membersection{wxWizardPageSimple::SetPrev}\label{wxwizardpagesimplesetprev}
156
157\func{void}{SetPrev}{\param{wxWizardPage* }{prev}}
158
159Sets the previous page.
160
161\membersection{wxWizardPageSimple::SetNext}\label{wxwizardpagesimplesetnext}
162
163\func{void}{SetNext}{\param{wxWizardPage* }{next}}
164
165Sets the next page.
166
167\membersection{wxWizardPageSimple::Chain}\label{wxwizardpagesimplechain}
168
169\func{static void}{Chain}{\param{wxWizardPageSimple* }{first}, \param{wxWizardPageSimple* }{second}}
170
171A convenience function to make the pages follow each other.
172
173Example:
d2c2afc9 174
f6bcfd97
BP
175\begin{verbatim}
176 wxRadioboxPage *page3 = new wxRadioboxPage(wizard);
177 wxValidationPage *page4 = new wxValidationPage(wizard);
178
179 wxWizardPageSimple::Chain(page3, page4);
180\end{verbatim}
181