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