X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4fe5383d6c6463e16e2d5b6b5fefe311b33e128f..98243feda0170861d11fafeb5fb2b3848ee36224:/include/wx/wizard.h diff --git a/include/wx/wizard.h b/include/wx/wizard.h index 1d30123a5e..ec311b7cb9 100644 --- a/include/wx/wizard.h +++ b/include/wx/wizard.h @@ -38,15 +38,26 @@ class WXDLLEXPORT wxWizard; class WXDLLEXPORT wxWizardPage : public wxPanel { public: - // ctor: no other parameters are needed because the wizard will resize and + // ctor accepts an optional bitmap which will be used for this page instead + // of the default one for this wizard (should be of the same size). Notice + // that no other parameters are needed because the wizard will resize and // reposition the page anyhow - wxWizardPage(wxWizard *parent); + wxWizardPage(wxWizard *parent, const wxBitmap& bitmap = wxNullBitmap); // these functions are used by the wizard to show another page when the // user chooses "Back" or "Next" button virtual wxWizardPage *GetPrev() const = 0; virtual wxWizardPage *GetNext() const = 0; + // default GetBitmap() will just return m_bitmap which is ok in 99% of + // cases - override this method if you want to create the bitmap to be used + // dynamically or to do something even more fancy. It's ok to return + // wxNullBitmap from here - the default one will be used then. + virtual wxBitmap GetBitmap() const { return m_bitmap; } + +protected: + wxBitmap m_bitmap; + private: DECLARE_ABSTRACT_CLASS(wxWizardPage) }; @@ -122,6 +133,11 @@ public: // get the current page (NULL if RunWizard() isn't running) virtual wxWizardPage *GetCurrentPage() const = 0; + // set the min size which should be available for the pages: a + // wizard will take into account the size of the bitmap (if any) + // itself and will never be less than some predefined fixed size + virtual void SetPageSize(const wxSize& size) = 0; + // get the size available for the page: the wizards are not resizeable, so // this size doesn't change virtual wxSize GetPageSize() const = 0;