Added possibility of 2-step initialisation, and wxWIZARD_EX_HELPBUTTON style.

Also added & to Cancel button.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11399 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2001-08-17 09:38:19 +00:00
parent 444ad3a719
commit 77436c4cba
3 changed files with 43 additions and 8 deletions

View File

@@ -20,11 +20,22 @@ class WXDLLEXPORT wxWizard : public wxWizardBase
{
public:
// ctor
wxWizard(wxWindow *parent = NULL,
wxWizard() { Init(); }
wxWizard(wxWindow *parent,
int id = -1,
const wxString& title = wxEmptyString,
const wxBitmap& bitmap = wxNullBitmap,
const wxPoint& pos = wxDefaultPosition)
{
Init();
Create(parent, id, title, bitmap, pos);
}
bool Create(wxWindow *parent,
int id = -1,
const wxString& title = wxEmptyString,
const wxBitmap& bitmap = wxNullBitmap,
const wxPoint& pos = wxDefaultPosition);
void Init();
// implement base class pure virtuals
virtual bool RunWizard(wxWizardPage *firstPage);
@@ -43,13 +54,14 @@ public:
// TransferDataFromWindow() returns FALSE - otherwise, returns TRUE
bool ShowPage(wxWizardPage *page, bool goingForward = TRUE);
// do fill the dialog with controls
// this is app-overridable to, for example, set help and tooltip text
void DoCreateControls();
private:
// was the dialog really created?
bool WasCreated() const { return m_btnPrev != NULL; }
// do fill the dialog with controls
void DoCreateControls();
// event handlers
void OnCancel(wxCommandEvent& event);
void OnBackOrNext(wxCommandEvent& event);