]> git.saurik.com Git - wxWidgets.git/blob - include/wx/generic/wizard.h
warning fix
[wxWidgets.git] / include / wx / generic / wizard.h
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 WXDLLEXPORT wxButton;
17 class WXDLLEXPORT wxStaticBitmap;
18
19 class WXDLLEXPORT wxWizard : public wxWizardBase
20 {
21 public:
22 // ctor
23 wxWizard(wxWindow *parent = NULL,
24 int id = -1,
25 const wxString& title = wxEmptyString,
26 const wxBitmap& bitmap = wxNullBitmap,
27 const wxPoint& pos = wxDefaultPosition);
28
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;
34
35 // implementation only from now on
36 // -------------------------------
37
38 // is the wizard running?
39 bool IsRunning() const { return m_page != NULL; }
40
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);
45
46 private:
47 // was the dialog really created?
48 bool WasCreated() const { return m_btnPrev != NULL; }
49
50 // do fill the dialog with controls
51 void DoCreateControls();
52
53 // event handlers
54 void OnCancel(wxCommandEvent& event);
55 void OnBackOrNext(wxCommandEvent& event);
56
57 // the page size requested by user
58 wxSize m_sizePage;
59
60 // the dialog position from the ctor
61 wxPoint m_posWizard;
62
63 // wizard dimensions
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)
67
68 // wizard state
69 wxWizardPage *m_page; // the current page or NULL
70 wxBitmap m_bitmap; // the default bitmap to show
71
72 // wizard controls
73 wxButton *m_btnPrev, // the "<Back" button
74 *m_btnNext; // the "Next>" or "Finish" button
75 wxStaticBitmap *m_statbmp; // the control for the bitmap
76
77 DECLARE_DYNAMIC_CLASS(wxWizard)
78 DECLARE_EVENT_TABLE()
79 };
80