%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 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.10.2.1 2006/07/03 16:45:33 MR Exp $
%% Copyright:   (c) Vadim Zeitlin
%% License:     wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{\class{wxWizardPage}}\label{wxwizardpage}

wxWizardPage is one of the screens in \helpref{wxWizard}{wxwizard}: it must
know what are the following and preceding pages (which may be {\tt NULL} for the
first/last page). Except for this extra knowledge, wxWizardPage is just a
panel, 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 wizard
dynamically (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 simpler
to use.

\wxheading{Virtual functions to override}

To use this class, you must override \helpref{GetPrev}{wxwizardpagegetprev} 
and \helpref{GetNext}{wxwizardpagegetnext} pure virtual functions (or you
may use \helpref{wxWizardPageSimple}{wxwizardpagesimple} instead).

\helpref{GetBitmap}{wxwizardpagegetbitmap} can also be overridden, but this
should 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 page
instead of the default one for this wizard (note that all bitmaps used should
be of the same size). Notice that no other parameters are needed because the
wizard 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 first
page of the wizard will usually return {\tt NULL} from here, but the others
will 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 last
page of the wizard will usually return {\tt NULL} from here, but the others
will 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 the
page. 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 page
bitmap 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 the
pointers given to its constructor from GetNext() and GetPrev() functions.

This makes it very easy to use the objects of this class in the wizards where
the pages order is known statically - on the other hand, if this is not the
case 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}

