]> git.saurik.com Git - wxWidgets.git/blame - include/wx/generic/wizard.h
html help : search panel now has more logical order of controls (list of books is...
[wxWidgets.git] / include / wx / generic / wizard.h
CommitLineData
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
16class wxWizard : public wxWizardBase
17{
18public:
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;
30
31 // implementation only from now on
32 // -------------------------------
33
34 // is the wizard running?
35 bool IsRunning() const { return m_page != NULL; }
36
37 // show the prev/next page, but call TransferDataFromWindow on the current
38 // page first and return FALSE without changing the page if it returns
39 // FALSE
40 bool ShowPage(wxWizardPage *page, bool goingForward = TRUE);
41
42private:
43 // event handlers
44 void OnCancel(wxCommandEvent& event);
45 void OnBackOrNext(wxCommandEvent& event);
46
47 // wizard dimensions
48 int m_x, m_y; // the origin for the pages
49 int m_width, // the size of the page itself
50 m_height; // (total width is m_width + m_x)
51
52 // wizard state
53 wxWizardPage *m_page; // the current page or NULL
54
55 // wizard controls
56 wxButton *m_btnPrev, // the "<Back" button
57 *m_btnNext; // the "Next>" or "Finish" button
58
59 DECLARE_DYNAMIC_CLASS(wxWizard)
60 DECLARE_EVENT_TABLE()
61};
62