X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3051a44a73502c2b03d1618d0a8e94274ee67e16..d6cf9064d4e7e342e99f368c38f9affc63c9bceb:/interface/wx/wizard.h diff --git a/interface/wx/wizard.h b/interface/wx/wizard.h index 3204fba198..501815d41e 100644 --- a/interface/wx/wizard.h +++ b/interface/wx/wizard.h @@ -3,9 +3,23 @@ // Purpose: interface of wxWizardPage, wxWizardEvent, // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// + +// Extended style to specify a help button +#define wxWIZARD_EX_HELPBUTTON 0x00000010 + +// Bitmap placement flags +#define wxWIZARD_VALIGN_TOP 0x01 +#define wxWIZARD_VALIGN_CENTRE 0x02 +#define wxWIZARD_VALIGN_BOTTOM 0x04 +#define wxWIZARD_HALIGN_LEFT 0x08 +#define wxWIZARD_HALIGN_CENTRE 0x10 +#define wxWIZARD_HALIGN_RIGHT 0x20 +#define wxWIZARD_TILE 0x40 + + /** @class wxWizardPage @@ -36,6 +50,11 @@ class wxWizardPage : public wxPanel { public: + /** + Default constructor. + */ + wxWizardPage(); + /** 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 @@ -50,6 +69,18 @@ public: wxWizardPage(wxWizard* parent, const wxBitmap& bitmap = wxNullBitmap); + /** + Creates the wizard page. + Must be called if the default constructor had been used to create the object. + + @param parent + The parent wizard + @param bitmap + The page-specific bitmap if different from the global one + */ + bool Create(wxWizard *parent, + const wxBitmap& bitmap = wxNullBitmap); + /** This method is called by wxWizard to get the bitmap to display alongside the page. By default, @c m_bitmap member variable which was set in the @@ -95,9 +126,15 @@ public: @beginEventTable{wxWizardEvent} @event{EVT_WIZARD_PAGE_CHANGED(id, func)} - The page has been just changed (this event can not be vetoed). + The page has been just changed (this event cannot be vetoed). @event{EVT_WIZARD_PAGE_CHANGING(id, func)} The page is being changed (this event can be vetoed). + @event{EVT_WIZARD_BEFORE_PAGE_CHANGED(id, func)} + Called after Next is clicked but before GetNext is called. Unlike EVT_WIZARD_CHANGING, + the handler for this function can change state that might affect the return value of + GetNext. This event can be vetoed. + @event{EVT_WIZARD_PAGE_SHOWN(id, func)} + The page was shown and laid out (this event cannot be vetoed). @event{EVT_WIZARD_CANCEL(id, func)} The user attempted to cancel the wizard (this event may also be vetoed). @event{EVT_WIZARD_HELP(id, func)} @@ -138,6 +175,14 @@ public: }; +wxEventType wxEVT_WIZARD_PAGE_CHANGED; +wxEventType wxEVT_WIZARD_PAGE_CHANGING; +wxEventType wxEVT_WIZARD_CANCEL; +wxEventType wxEVT_WIZARD_HELP; +wxEventType wxEVT_WIZARD_FINISHED; +wxEventType wxEVT_WIZARD_PAGE_SHOWN; +wxEventType wxEVT_WIZARD_BEFORE_PAGE_CHANGED; + /** @class wxWizardPageSimple @@ -158,6 +203,11 @@ public: class wxWizardPageSimple : public wxWizardPage { public: + /** + Default constructor. + */ + wxWizardPageSimple(); + /** Constructor takes the previous and next pages. They may be modified later by SetPrev() or SetNext(). @@ -167,6 +217,15 @@ public: wxWizardPage* next = NULL, const wxBitmap& bitmap = wxNullBitmap); + /** + Creates the wizard page. + Must be called if the default constructor had been used to create the object. + */ + bool Create(wxWizard *parent = NULL, + wxWizardPage *prev = NULL, + wxWizardPage *next = NULL, + const wxBitmap& bitmap = wxNullBitmap); + /** A convenience function to make the pages follow each other. Example: @@ -229,6 +288,12 @@ public: The page has just been changed (this event cannot be vetoed). @event{EVT_WIZARD_PAGE_CHANGING(id, func)} The page is being changed (this event can be vetoed). + @event{EVT_WIZARD_BEFORE_PAGE_CHANGED(id, func)} + Called after Next is clicked but before GetNext is called. Unlike EVT_WIZARD_CHANGING, + the handler for this function can change state that might affect the return value of + GetNext. This event can be vetoed. + @event{EVT_WIZARD_PAGE_SHOWN(id, func)} + The page was shown and laid out (this event cannot be vetoed). @event{EVT_WIZARD_CANCEL(id, func)} The user attempted to cancel the wizard (this event may also be vetoed). @event{EVT_WIZARD_HELP(id, func)} @@ -428,7 +493,7 @@ public: /** Executes the wizard starting from the given page, returning @true if it was successfully finished or @false if user cancelled it. - The @a firstPage can not be @NULL. + The @a firstPage cannot be @NULL. */ virtual bool RunWizard(wxWizardPage* firstPage); @@ -491,7 +556,7 @@ public: Also, the wizard will never be smaller than the default size. The recommended way to use this function is to lay out all wizard pages - using the sizers (even though the wizard is not resizeable) and then use + using the sizers (even though the wizard is not resizable) and then use wxSizer::CalcMin() in a loop to calculate the maximum of minimal sizes of the pages and pass it to SetPageSize(). */