X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/750cefbca2741b1be65adcd5480dd85a2d049a6c..2c6f14e1a7b5062fcf77eda40824d820d9ac288e:/docs/latex/wx/wizard.tex

diff --git a/docs/latex/wx/wizard.tex b/docs/latex/wx/wizard.tex
index 2ae93d6650..6b0e715169 100644
--- a/docs/latex/wx/wizard.tex
+++ b/docs/latex/wx/wizard.tex
@@ -2,7 +2,7 @@
 %% Name:        wizard.tex
 %% Purpose:     wxWizard class documentation
 %% Author:      Vadim Zeitlin
-%% Modified by:
+%% Modified by: Robert Vazan (sizers)
 %% Created:     02.04.00
 %% RCS-ID:      $Id$
 %% Copyright:   (c) Vadim Zeitlin
@@ -55,6 +55,7 @@ changed (this event can be vetoed).}
 \twocolitem{{\bf EVT\_WIZARD\_CANCEL(id, func)}}{The user attempted to cancel
 the wizard (this event may also be vetoed).}
 \twocolitem{{\bf EVT\_WIZARD\_HELP(id, func)}}{The wizard help button was pressed.}
+\twocolitem{{\bf EVT\_WIZARD\_FINISHED(id, func)}}{The wizard finished button was pressed.}
 \end{twocollist}%
 
 \wxheading{Extended styles}
@@ -84,7 +85,7 @@ Default constructor. Use this if you wish to derive from wxWizard and then call
 with \helpref{wxWindow::SetExtraStyle}{wxwindowsetextrastyle} between the two
 calls.
 
-\func{}{wxWizard}{\param{wxWindow* }{parent}, \param{int }{id = -1}, \param{const wxString\& }{title = wxEmptyString}, \param{const wxBitmap\& }{bitmap = wxNullBitmap}, \param{const wxPoint\& }{pos = wxDefaultPosition}}
+\func{}{wxWizard}{\param{wxWindow* }{parent}, \param{int }{id = -1}, \param{const wxString\& }{title = wxEmptyString}, \param{const wxBitmap\& }{bitmap = wxNullBitmap}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{long }{style = wxDEFAULT_DIALOG_STYLE}}
 
 Constructor which really creates the wizard -- if you use this constructor, you
 shouldn't call \helpref{Create}{wxwizardcreate}.
@@ -92,7 +93,7 @@ shouldn't call \helpref{Create}{wxwizardcreate}.
 Notice that unlike almost all other wxWindows classes, there is no {\it size} 
 parameter in wxWizard constructor because the wizard will have a predefined
 default size by default. If you want to change this, you should use the 
-\helpref{SetPageSize}{wxwizardsetpagesize} function.
+\helpref{GetPageAreaSizer}{wxwizardgetpageareasizer} function.
 
 \wxheading{Parameters}
 
@@ -108,9 +109,12 @@ also \helpref{GetBitmap}{wxwizardpagegetbitmap}.}
 \docparam{pos}{The position of the dialog, it will be centered on the screen
 by default.}
 
+\docparam{style}{Window style is passed to wxDialog.}
+
+
 \membersection{wxWizard::Create}\label{wxwizardcreate}
 
-\func{bool}{Create}{\param{wxWindow* }{parent}, \param{int }{id = -1}, \param{const wxString\& }{title = wxEmptyString}, \param{const wxBitmap\& }{bitmap = wxNullBitmap}, \param{const wxPoint\& }{pos = wxDefaultPosition}}
+\func{bool}{Create}{\param{wxWindow* }{parent}, \param{int }{id = -1}, \param{const wxString\& }{title = wxEmptyString}, \param{const wxBitmap\& }{bitmap = wxNullBitmap}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{long }{style = wxDEFAULT_DIALOG_STYLE}}
 
 Creates the wizard dialog. Must be called if the default constructor had been
 used to create the object.
@@ -118,7 +122,7 @@ used to create the object.
 Notice that unlike almost all other wxWindows classes, there is no {\it size} 
 parameter in wxWizard constructor because the wizard will have a predefined
 default size by default. If you want to change this, you should use the 
-\helpref{SetPageSize}{wxwizardsetpagesize} function.
+\helpref{GetPageAreaSizer}{wxwizardgetpageareasizer} function.
 
 \wxheading{Parameters}
 
@@ -134,9 +138,15 @@ also \helpref{GetBitmap}{wxwizardpagegetbitmap}.}
 \docparam{pos}{The position of the dialog, it will be centered on the screen
 by default.}
 
-\membersection{wxWizard::Fit}\label{wxwizardfit}
+\docparam{style}{Window style is passed to wxDialog.}
+
+
+\membersection{wxWizard::FitToPage}\label{wxwizardfittopage}
+
+\func{void}{FitToPage}{\param{const wxWizardPage* }{firstPage}}
 
-\func{void}{Fit}{\param{const wxWizardPage* }{firstPage}}
+This method is obsolete, use
+\helpref{GetPageAreaSizer}{wxwizardgetpageareasizer} instead.
 
 Sets the page size to be big enough for all the pages accessible via the
 given {\it firstPage}, i.e. this page, its next page and so on.
@@ -147,6 +157,7 @@ This is useful if the decision about which pages to show is taken during the
 run-time as in this case, the wizard won't be able to get to all pages starting
 from a single one and you should call {\it Fit} separately for the others.
 
+
 \membersection{wxWizard::GetCurrentPage}\label{wxwizardgetcurrentpage}
 
 \constfunc{wxWizardPage*}{GetCurrentPage}{\void}
@@ -154,24 +165,90 @@ from a single one and you should call {\it Fit} separately for the others.
 Get the current page while the wizard is running. {\tt NULL} is returned if 
 \helpref{RunWizard()}{wxwizardrunwizard} is not being executed now.
 
+
+\membersection{wxWizard::GetPageAreaSizer}\label{wxwizardgetpageareasizer}
+
+\constfunc{virtual wxSizer*}{GetPageAreaSizer}{\void}
+
+Returns pointer to page area sizer. Wizard is laid out using sizers and
+page area sizer is the place holder for the pages. All pages are resized before
+being shown to match the wizard page area.
+
+Page area sizer has minimal size that is maximum of several values. First,
+all pages (or other objects) added to the sizer. Second, all pages reachable
+by repeatedly applying 
+\helpref{wxWizardPage::GetNext}{wxwizardpagegetnext} to
+any page inserted into the sizer. Third,
+minimal size specified using \helpref{SetPageSize}{wxwizardsetpagesize} and 
+\helpref{FitToPage}{wxwizardfittopage}. Fourth, the total wizard height may
+be increased to accomodate the bitmap height. Fifth and finally, wizards are
+never smaller some built-in minimal size to avoid too small wizards.
+
+Caller can use \helpref{wxSizer::SetMinSize}{wxsizersetminsize} to enlarge it
+beyond minimal size. If {\tt wxRESIZE\_BORDER} was passed to constructor, user
+can resize wizard and consequently page area (but not make it smaller than the
+minimal size).
+
+It is recommended to add first page to page area sizer. For simple wizards,
+this will enlarge the wizard to fit biggest page. For non-linear wizards,
+first page of every separate chain should be added. Caller-specified size
+can be accomplished using \helpref{wxSizer::SetMinSize}{wxsizersetminsize}.
+
+Adding pages to page area sizer affects default border width around page
+area that can be altered with \helpref{SetBorder}{wxwizardsetborder}.
+
+
 \membersection{wxWizard::GetPageSize}\label{wxwizardgetpagesize}
 
 \constfunc{wxSize}{GetPageSize}{\void}
 
 Returns the size available for the pages.
 
+
+\membersection{wxWizard::HasNextPage}\label{wxwizardhasnextpage}
+
+\func{virtual bool}{HasNextPage}{\param{wxWizardPage *}{page}}
+
+Return {\tt true} if this page is not the last one in the wizard. The base
+class version implements this by calling 
+\helpref{page->GetNext}{wxwizardpagegetnext} but this could be undesirable if,
+for example, the pages are created on demand only.
+
+\wxheading{See also}
+
+\helpref{HasPrevPage}{wxwizardhasprevpage}
+
+
+\membersection{wxWizard::HasPrevPage}\label{wxwizardhasprevpage}
+
+\func{virtual bool}{HasPrevPage}{\param{wxWizardPage *}{page}}
+
+Return {\tt true} if this page is not the last one in the wizard. The base
+class version implements this by calling 
+\helpref{page->GetPrev}{wxwizardpagegetprev} but this could be undesirable if,
+for example, the pages are created on demand only.
+
+\wxheading{See also}
+
+\helpref{HasNextPage}{wxwizardhasnextpage}
+
+
 \membersection{wxWizard::RunWizard}\label{wxwizardrunwizard}
 
 \func{bool}{RunWizard}{\param{wxWizardPage* }{firstPage}}
 
-Executes the wizard starting from the given page, returns {\tt TRUE} if it was
-successfully finished or {\tt FALSE} if user cancelled it. The {\it firstPage} 
+Executes the wizard starting from the given page, returns {\tt true} if it was
+successfully finished or {\tt false} if user cancelled it. The {\it firstPage} 
 can not be {\tt NULL}.
 
+
 \membersection{wxWizard::SetPageSize}\label{wxwizardsetpagesize}
 
 \func{void}{SetPageSize}{\param{const wxSize\& }{sizePage}}
 
+This method is obsolete, use
+\helpref{GetPageAreaSizer}{wxwizardgetpageareasizer} instead.
+
 Sets the minimal size to be made available for the wizard pages. The wizard
 will take into account the size of the bitmap (if any) itself. Also, the
 wizard will never be smaller than the default size.
@@ -181,3 +258,17 @@ the sizers (even though the wizard is not resizeable) and then use
 \helpref{wxSizer::CalcMin}{wxsizercalcmin} in a loop to calculate the maximum
 of minimal sizes of the pages and pass it to SetPageSize().
 
+
+\membersection{wxWizard::SetBorder}\label{wxwizardsetborder}
+
+\func{void}{SetBorder}{\param{int }{border}}
+
+Sets width of border around page area. Default is zero. For backward
+compatibility, if there are no pages in
+\helpref{GetPageAreaSizer}{wxwizardgetpageareasizer}, default is $5$ pixels.
+
+If there is five point border around all controls in a page and border around
+page area is left zero, five point white space along all dialog borders
+will be added to control border to space page controls ten points from dialog
+border and non-page controls.
+
