X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cf737db6572385131ef0d34041566489b631c3f9..9e9574fe45b176ee74bba8fad7574cf9906145d1:/interface/wx/wizard.h diff --git a/interface/wx/wizard.h b/interface/wx/wizard.h index 501815d41e..6ad183e372 100644 --- a/interface/wx/wizard.h +++ b/interface/wx/wizard.h @@ -2,7 +2,6 @@ // Name: wizard.h // Purpose: interface of wxWizardPage, wxWizardEvent, // Author: wxWidgets team -// RCS-ID: $Id$ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -226,6 +225,30 @@ public: wxWizardPage *next = NULL, const wxBitmap& bitmap = wxNullBitmap); + /** + A helper chaining this page with the next one. + + Notice that this method returns a reference to the next page, so the + calls to it can, in turn, be chained: + + @code + wxWizardPageSimple* firstPage = new FirstPage; + (*firstPage).Chain(new SecondPage) + .Chain(new ThirdPage) + .Chain(new LastPage); + @endcode + + This makes this method the simplest way to define the order of changes + in fully static wizards, i.e. in those where the order doesn't depend + on the choices made by the user in the wizard pages during run-time. + + @param next A non-@NULL pointer to the next page. + @return Reference to @a next on which Chain() can be called again. + + @since 2.9.5 + */ + wxWizardPageSimple& Chain(wxWizardPageSimple* next); + /** A convenience function to make the pages follow each other. Example: @@ -386,7 +409,7 @@ public: bool Create(wxWindow* parent, int id = wxID_ANY, const wxString& title = wxEmptyString, const wxBitmap& bitmap = wxNullBitmap, - const wxPoint& pos = wxDefaultPosition, long style = 536877056); + const wxPoint& pos = wxDefaultPosition, long style = wxDEFAULT_DIALOG_STYLE); /** This method is obsolete, use GetPageAreaSizer() instead.