1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: generic/wizard.h
3 // Purpose: declaration of generic wxWizard class
4 // Author: Vadim Zeitlin
8 // Copyright: (c) 1999 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
9 // Licence: wxWindows license
10 ///////////////////////////////////////////////////////////////////////////////
12 // ----------------------------------------------------------------------------
14 // ----------------------------------------------------------------------------
16 class WXDLLEXPORT wxButton
;
17 class WXDLLEXPORT wxStaticBitmap
;
19 class WXDLLEXPORT wxWizard
: public wxWizardBase
23 wxWizard(wxWindow
*parent
= NULL
,
25 const wxString
& title
= wxEmptyString
,
26 const wxBitmap
& bitmap
= wxNullBitmap
,
27 const wxPoint
& pos
= wxDefaultPosition
);
29 // implement base class pure virtuals
30 virtual bool RunWizard(wxWizardPage
*firstPage
);
31 virtual wxWizardPage
*GetCurrentPage() const;
32 virtual void SetPageSize(const wxSize
& size
);
33 virtual wxSize
GetPageSize() const;
35 // implementation only from now on
36 // -------------------------------
38 // is the wizard running?
39 bool IsRunning() const { return m_page
!= NULL
; }
41 // show the prev/next page, but call TransferDataFromWindow on the current
42 // page first and return FALSE without changing the page if
43 // TransferDataFromWindow() returns FALSE - otherwise, returns TRUE
44 bool ShowPage(wxWizardPage
*page
, bool goingForward
= TRUE
);
47 // was the dialog really created?
48 bool WasCreated() const { return m_btnPrev
!= NULL
; }
50 // do fill the dialog with controls
51 void DoCreateControls();
54 void OnCancel(wxCommandEvent
& event
);
55 void OnBackOrNext(wxCommandEvent
& event
);
57 // the page size requested by user
60 // the dialog position from the ctor
64 int m_x
, m_y
; // the origin for the pages
65 int m_width
, // the size of the page itself
66 m_height
; // (total width is m_width + m_x)
69 wxWizardPage
*m_page
; // the current page or NULL
70 wxBitmap m_bitmap
; // the default bitmap to show
73 wxButton
*m_btnPrev
, // the "<Back" button
74 *m_btnNext
; // the "Next>" or "Finish" button
75 wxStaticBitmap
*m_statbmp
; // the control for the bitmap
77 DECLARE_DYNAMIC_CLASS(wxWizard
)