-// ----------------------------------------------------------------------------
-// wxWizardGeneric - generic implementation of wxWizard
-// ----------------------------------------------------------------------------
-
-class wxWizardGeneric : public wxWizard
-{
-public:
- // ctor
- wxWizardGeneric(wxWindow *parent,
- int id,
- const wxString& title,
- const wxBitmap& bitmap,
- const wxPoint& pos,
- const wxSize& size);
-
- // implement base class pure virtuals
- virtual void AddPage(wxPanel *page);
- virtual void InsertPage(int nPage, wxPanel *page);
- virtual bool RunWizard();
- virtual wxPanel *GetCurrentPage() const;
-
- // implementation only from now on
- // -------------------------------
-
- // is the wizard running?
- bool IsRunning() const { return m_page != -1; }
-
- // show the given page calling TransferDataFromWindow - if it returns
- // FALSE, the old page is not hidden and the function returns FALSE
- bool ShowPage(size_t page);
-
- // get the current page assuming the wizard is running
- wxPanel *DoGetCurrentPage() const
- {
- wxASSERT_MSG( IsRunning(), _T("no current page!") );
-
- return m_pages[(size_t)m_page];
- }
-
- // place the given page correctly and hide it
- void DoAddPage(wxPanel *page);
-
-private:
- // event handlers
- void OnCancel(wxCommandEvent& event);
- void OnBackOrNext(wxCommandEvent& event);
-
- // wizard dimensions
- int m_x, m_y; // the origin for the pages
- int m_width, // the size of the page itself
- m_height; // (total width is m_width + m_x)
-
- // wizard state
- int m_page; // the current page or -1
- wxArrayPages m_pages; // the array with all wizards pages
-
- // wizard controls
- wxButton *m_btnPrev, // the "<Back" button
- *m_btnNext; // the "Next>" or "Finish" button
-
- DECLARE_EVENT_TABLE()
-};
-