]>
Commit | Line | Data |
---|---|---|
74b31181 VZ |
1 | /////////////////////////////////////////////////////////////////////////////// |
2 | // Name: generic/wizard.h | |
3 | // Purpose: declaration of generic wxWizard class | |
4 | // Author: Vadim Zeitlin | |
5 | // Modified by: | |
6 | // Created: 28.09.99 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) 1999 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> | |
9 | // Licence: wxWindows license | |
10 | /////////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | // ---------------------------------------------------------------------------- | |
13 | // wxWizard | |
14 | // ---------------------------------------------------------------------------- | |
15 | ||
16 | class wxWizard : public wxWizardBase | |
17 | { | |
18 | public: | |
19 | // ctor | |
20 | wxWizard(wxWindow *parent = NULL, | |
21 | int id = -1, | |
22 | const wxString& title = wxEmptyString, | |
23 | const wxBitmap& bitmap = wxNullBitmap, | |
24 | const wxPoint& pos = wxDefaultPosition, | |
25 | const wxSize& size = wxDefaultSize); | |
26 | ||
27 | // implement base class pure virtuals | |
28 | virtual bool RunWizard(wxWizardPage *firstPage); | |
29 | virtual wxWizardPage *GetCurrentPage() const; | |
4fe5383d | 30 | virtual wxSize GetPageSize() const; |
74b31181 VZ |
31 | |
32 | // implementation only from now on | |
33 | // ------------------------------- | |
34 | ||
35 | // is the wizard running? | |
36 | bool IsRunning() const { return m_page != NULL; } | |
37 | ||
38 | // show the prev/next page, but call TransferDataFromWindow on the current | |
39 | // page first and return FALSE without changing the page if it returns | |
40 | // FALSE | |
41 | bool ShowPage(wxWizardPage *page, bool goingForward = TRUE); | |
42 | ||
43 | private: | |
44 | // event handlers | |
45 | void OnCancel(wxCommandEvent& event); | |
46 | void OnBackOrNext(wxCommandEvent& event); | |
47 | ||
48 | // wizard dimensions | |
49 | int m_x, m_y; // the origin for the pages | |
50 | int m_width, // the size of the page itself | |
51 | m_height; // (total width is m_width + m_x) | |
52 | ||
53 | // wizard state | |
54 | wxWizardPage *m_page; // the current page or NULL | |
55 | ||
56 | // wizard controls | |
57 | wxButton *m_btnPrev, // the "<Back" button | |
58 | *m_btnNext; // the "Next>" or "Finish" button | |
59 | ||
60 | DECLARE_DYNAMIC_CLASS(wxWizard) | |
61 | DECLARE_EVENT_TABLE() | |
62 | }; | |
63 |