1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %% Purpose: wxWizardPage and wxWizardPageSimple classes documentation
4 %% Author: Vadim Zeitlin
8 %% Copyright: (c) Vadim Zeitlin
9 %% License: wxWindows license
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12 \section{\class{wxWizardPage
}}\label{wxwizardpage
}
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.
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
25 \wxheading{Virtual functions to override
}
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).
31 \helpref{GetBitmap
}{wxwizardpagegetbitmap
} can also be overridden, but this
32 should be very rarely needed.
34 \wxheading{Derived from
}
36 \helpref{wxPanel
}{wxpanel
}\\
37 \helpref{wxWindow
}{wxwindow
}\\
38 \helpref{wxEvtHandler
}{wxevthandler
}\\
39 \helpref{wxObject
}{wxobject
}
41 \wxheading{Include files
}
47 \helpref{wxAdv
}{librarieslist
}
51 \helpref{wxWizard
}{wxwizard
},
\helpref{wxWizard sample
}{samplewizard
}
53 \latexignore{\rtfignore{\wxheading{Members
}}}
55 \membersection{wxWizardPage::wxWizardPage
}\label{wxwizardpagewxwizardpage
}
57 \func{}{wxWizardPage
}{\param{wxWizard*
}{parent
},
\param{const wxBitmap\&
}{bitmap = wxNullBitmap
}}
59 Constructor accepts an optional bitmap which will be used for this page
60 instead of the default one for this wizard (note that all bitmaps used should
61 be of the same size). Notice that no other parameters are needed because the
62 wizard will resize and reposition the page anyhow.
64 \wxheading{Parameters
}
66 \docparam{parent
}{The parent wizard
}
68 \docparam{bitmap
}{The page-specific bitmap if different from the global one
}
71 \membersection{wxWizardPage::GetPrev
}\label{wxwizardpagegetprev
}
73 \constfunc{wxWizardPage*
}{GetPrev
}{\void}
75 Get the page which should be shown when the user chooses the
{\tt "Back"
}
76 button: if
{\tt NULL
} is returned, this button will be disabled. The first
77 page of the wizard will usually return
{\tt NULL
} from here, but the others
82 \helpref{GetNext
}{wxwizardpagegetnext
}
84 \membersection{wxWizardPage::GetNext
}\label{wxwizardpagegetnext
}
86 \constfunc{wxWizardPage*
}{GetNext
}{\void}
88 Get the page which should be shown when the user chooses the
{\tt "Next"
}
89 button: if
{\tt NULL
} is returned, this button will be disabled. The last
90 page of the wizard will usually return
{\tt NULL
} from here, but the others
95 \helpref{GetPrev
}{wxwizardpagegetprev
}
97 \membersection{wxWizardPage::GetBitmap
}\label{wxwizardpagegetbitmap
}
99 \constfunc{wxBitmap
}{GetBitmap
}{\void}
101 This method is called by wxWizard to get the bitmap to display alongside the
102 page. By default,
{\tt m
\_bitmap} member variable which was set in the
103 \helpref{constructor
}{wxwizardpagewxwizardpage
}.
105 If the bitmap was not explicitly set (i.e. if
{\tt wxNullBitmap
} is returned),
106 the default bitmap for the wizard should be used.
108 The only cases when you would want to override this function is if the page
109 bitmap depends dynamically on the user choices, i.e. almost never.
111 %%%%%%%%%%%%%%%%%%%%%%%%%%%%% wxWizardPageSimple %%%%%%%%%%%%%%%%%%%%%%%%%%%%
113 \section{\class{wxWizardPageSimple
}}\label{wxwizardpagesimple
}
115 wxWizardPageSimple is the simplest possible
116 \helpref{wxWizardPage
}{wxwizardpage
} implementation: it just returns the
117 pointers given to its constructor from GetNext() and GetPrev() functions.
119 This makes it very easy to use the objects of this class in the wizards where
120 the pages order is known statically - on the other hand, if this is not the
121 case you must derive your own class from
\helpref{wxWizardPage
}{wxwizardpage
}
124 \wxheading{Derived from
}
126 \helpref{wxWizardPage
}{wxwizardpage
}\\
127 \helpref{wxPanel
}{wxpanel
}\\
128 \helpref{wxWindow
}{wxwindow
}\\
129 \helpref{wxEvtHandler
}{wxevthandler
}\\
130 \helpref{wxObject
}{wxobject
}
132 \wxheading{Include files
}
138 \helpref{wxAdv
}{librarieslist
}
142 \helpref{wxWizard
}{wxwizard
},
\helpref{wxWizard sample
}{samplewizard
}
144 \latexignore{\rtfignore{\wxheading{Members
}}}
146 \membersection{wxWizardPageSimple::wxWizardPageSimple
}\label{wxwizardpagesimplewxwizardpagesimple
}
148 \func{}{wxWizardPageSimple
}{\param{wxWizard*
}{parent = NULL
},
\param{wxWizardPage*
}{prev = NULL
},
\param{wxWizardPage*
}{next = NULL
},
149 \param{const wxBitmap\&
}{bitmap = wxNullBitmap
}}
151 Constructor takes the previous and next pages. They may be modified later by
152 \helpref{SetPrev()
}{wxwizardpagesimplesetprev
} or
153 \helpref{SetNext()
}{wxwizardpagesimplesetnext
}.
155 \membersection{wxWizardPageSimple::SetPrev
}\label{wxwizardpagesimplesetprev
}
157 \func{void
}{SetPrev
}{\param{wxWizardPage*
}{prev
}}
159 Sets the previous page.
161 \membersection{wxWizardPageSimple::SetNext
}\label{wxwizardpagesimplesetnext
}
163 \func{void
}{SetNext
}{\param{wxWizardPage*
}{next
}}
167 \membersection{wxWizardPageSimple::Chain
}\label{wxwizardpagesimplechain
}
169 \func{static void
}{Chain
}{\param{wxWizardPageSimple*
}{first
},
\param{wxWizardPageSimple*
}{second
}}
171 A convenience function to make the pages follow each other.
176 wxRadioboxPage *page3 = new wxRadioboxPage(wizard);
177 wxValidationPage *page4 = new wxValidationPage(wizard);
179 wxWizardPageSimple::Chain(page3, page4);