📄 wizpage.tex
字号:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Name: wizpage.tex%% Purpose: wxWizardPage and wxWizardPageSimple classes documentation%% Author: Vadim Zeitlin%% Modified by:%% Created: 02.04.00%% RCS-ID: $Id: wizpage.tex,v 1.11 2006/05/28 23:56:50 VZ Exp $%% Copyright: (c) Vadim Zeitlin%% License: wxWindows license%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\section{\class{wxWizardPage}}\label{wxwizardpage}wxWizardPage is one of the screens in \helpref{wxWizard}{wxwizard}: it mustknow what are the following and preceding pages (which may be {\tt NULL} for thefirst/last page). Except for this extra knowledge, wxWizardPage is just apanel, so the controls may be placed directly on it in the usual way.This class allows the programmer to decide the order of pages in the wizarddynamically (during run-time) and so provides maximal flexibility. Usually,however, the order of pages is known in advance in which case \helpref{wxWizardPageSimple}{wxwizardpagesimple} class is enough and it is simplerto use.\wxheading{Virtual functions to override}To use this class, you must override \helpref{GetPrev}{wxwizardpagegetprev} and \helpref{GetNext}{wxwizardpagegetnext} pure virtual functions (or youmay use \helpref{wxWizardPageSimple}{wxwizardpagesimple} instead).\helpref{GetBitmap}{wxwizardpagegetbitmap} can also be overridden, but thisshould be very rarely needed.\wxheading{Derived from}\helpref{wxPanel}{wxpanel}\\\helpref{wxWindow}{wxwindow}\\\helpref{wxEvtHandler}{wxevthandler}\\\helpref{wxObject}{wxobject}\wxheading{Include files}<wx/wizard.h>\wxheading{See also}\helpref{wxWizard}{wxwizard}, \helpref{wxWizard sample}{samplewizard}\latexignore{\rtfignore{\wxheading{Members}}}\membersection{wxWizardPage::wxWizardPage}\label{wxwizardpagewxwizardpage}\func{}{wxWizardPage}{\param{wxWizard* }{parent}, \param{const wxBitmap\& }{bitmap = wxNullBitmap}, \param{const wxChar }{*resource = NULL}}Constructor accepts an optional bitmap which will be used for this pageinstead of the default one for this wizard (note that all bitmaps used shouldbe of the same size). Notice that no other parameters are needed because thewizard will resize and reposition the page anyhow.\wxheading{Parameters}\docparam{parent}{The parent wizard}\docparam{bitmap}{The page-specific bitmap if different from the global one}\docparam{resource}{Load the page from the specified resource if non-NULL}\membersection{wxWizardPage::GetPrev}\label{wxwizardpagegetprev}\constfunc{wxWizardPage*}{GetPrev}{\void}Get the page which should be shown when the user chooses the {\tt "Back"}button: if {\tt NULL} is returned, this button will be disabled. The firstpage of the wizard will usually return {\tt NULL} from here, but the otherswill not.\wxheading{See also}\helpref{GetNext}{wxwizardpagegetnext}\membersection{wxWizardPage::GetNext}\label{wxwizardpagegetnext}\constfunc{wxWizardPage*}{GetNext}{\void}Get the page which should be shown when the user chooses the {\tt "Next"}button: if {\tt NULL} is returned, this button will be disabled. The lastpage of the wizard will usually return {\tt NULL} from here, but the otherswill not.\wxheading{See also}\helpref{GetPrev}{wxwizardpagegetprev}\membersection{wxWizardPage::GetBitmap}\label{wxwizardpagegetbitmap}\constfunc{wxBitmap}{GetBitmap}{\void}This method is called by wxWizard to get the bitmap to display alongside thepage. By default, {\tt m\_bitmap} member variable which was set in the \helpref{constructor}{wxwizardpagewxwizardpage}.If the bitmap was not explicitly set (i.e. if {\tt wxNullBitmap} is returned),the default bitmap for the wizard should be used.The only cases when you would want to override this function is if the pagebitmap depends dynamically on the user choices, i.e. almost never.%%%%%%%%%%%%%%%%%%%%%%%%%%%%% wxWizardPageSimple %%%%%%%%%%%%%%%%%%%%%%%%%%%%\section{\class{wxWizardPageSimple}}\label{wxwizardpagesimple}wxWizardPageSimple is the simplest possible \helpref{wxWizardPage}{wxwizardpage} implementation: it just returns thepointers given to its constructor from GetNext() and GetPrev() functions.This makes it very easy to use the objects of this class in the wizards wherethe pages order is known statically - on the other hand, if this is not thecase you must derive your own class from \helpref{wxWizardPage}{wxwizardpage} instead.\wxheading{Derived from}\helpref{wxWizardPage}{wxwizardpage}\\\helpref{wxPanel}{wxpanel}\\\helpref{wxWindow}{wxwindow}\\\helpref{wxEvtHandler}{wxevthandler}\\\helpref{wxObject}{wxobject}\wxheading{Include files}<wx/wizard.h>\wxheading{See also}\helpref{wxWizard}{wxwizard}, \helpref{wxWizard sample}{samplewizard}\latexignore{\rtfignore{\wxheading{Members}}}\membersection{wxWizardPageSimple::wxWizardPageSimple}\label{wxwizardpagesimplewxwizardpagesimple}\func{}{wxWizardPageSimple}{\param{wxWizard* }{parent = NULL}, \param{wxWizardPage* }{prev = NULL}, \param{wxWizardPage* }{next = NULL}, \param{const wxBitmap\& }{bitmap = wxNullBitmap}}Constructor takes the previous and next pages. They may be modified later by\helpref{SetPrev()}{wxwizardpagesimplesetprev} or \helpref{SetNext()}{wxwizardpagesimplesetnext}.\membersection{wxWizardPageSimple::SetPrev}\label{wxwizardpagesimplesetprev}\func{void}{SetPrev}{\param{wxWizardPage* }{prev}}Sets the previous page.\membersection{wxWizardPageSimple::SetNext}\label{wxwizardpagesimplesetnext}\func{void}{SetNext}{\param{wxWizardPage* }{next}}Sets the next page.\membersection{wxWizardPageSimple::Chain}\label{wxwizardpagesimplechain}\func{static void}{Chain}{\param{wxWizardPageSimple* }{first}, \param{wxWizardPageSimple* }{second}}A convenience function to make the pages follow each other.Example:\begin{verbatim} wxRadioboxPage *page3 = new wxRadioboxPage(wizard); wxValidationPage *page4 = new wxValidationPage(wizard); wxWizardPageSimple::Chain(page3, page4);\end{verbatim}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -