]> git.saurik.com Git - wxWidgets.git/blob - samples/notebook/test.h
33b31a06af06ed81d786486886a861b4c1d1cc32
[wxWidgets.git] / samples / notebook / test.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: test.h
3 // Purpose: wxNotebook demo
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 25/10/98
7 // RCS-ID: $Id$
8 // Copyright: (c)
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #include <wx/notebook.h>
13
14 // Define a new application
15 class MyApp: public wxApp
16 {
17 public:
18 bool OnInit(void);
19 void InitTabView(wxNotebook* notebook, wxPanel* window);
20
21 wxButton* m_okButton;
22 wxButton* m_cancelButton;
23 wxButton* m_addPageButton;
24 wxButton* m_nextPageButton;
25 };
26
27 DECLARE_APP(MyApp)
28
29 #if USE_TABBED_DIALOG
30
31 class MyDialog: public wxDialog
32 {
33 public:
34 MyDialog(wxWindow* parent, const wxWindowID id, const wxString& title,
35 const wxPoint& pos, const wxSize& size, const long windowStyle = wxDEFAULT_DIALOG_STYLE);
36
37 void OnOK(wxCommandEvent& event);
38 void OnCloseWindow(wxCloseEvent& event);
39 void Init(void);
40
41 protected:
42 wxNotebook* m_notebook;
43
44 DECLARE_EVENT_TABLE()
45 };
46
47 #else // USE_TABBED_DIALOG
48
49 class MyFrame: public wxFrame
50 {
51 public:
52 MyFrame(wxFrame* parent, const wxWindowID id, const wxString& title,
53 const wxPoint& pos, const wxSize& size, const long windowStyle = wxDEFAULT_FRAME_STYLE);
54
55 void OnOK(wxCommandEvent& event);
56 void OnCloseWindow(wxCloseEvent& event);
57 void OnAddPage(wxCommandEvent& event);
58 void OnNextPage(wxCommandEvent& event);
59 void OnDeletePage(wxCommandEvent& event);
60 void OnIdle(wxIdleEvent& event);
61
62 void Init();
63
64 protected:
65 wxNotebook* m_notebook;
66 wxPanel* m_panel; // Panel containing notebook and OK/Cancel/Help
67
68 DECLARE_EVENT_TABLE()
69 };
70
71 #endif // USE_TABBED_DIALOG
72
73 // File ids
74 #define TEST_ABOUT 2
75
76 // Tab ids
77 #define TEST_TAB_DOG 1
78 #define TEST_TAB_CAT 2
79 #define TEST_TAB_GOAT 3
80 #define TEST_TAB_GUINEAPIG 4
81 #define TEST_TAB_ANTEATER 5
82 #define TEST_TAB_HUMMINGBIRD 6
83 #define TEST_TAB_SHEEP 7
84 #define TEST_TAB_COW 8
85 #define TEST_TAB_HORSE 9
86 #define TEST_TAB_PIG 10
87 #define TEST_TAB_OSTRICH 11
88 #define TEST_TAB_AARDVARK 12
89
90 #define ID_NOTEBOOK 1000
91 #define ID_ADD_PAGE 1200
92 #define ID_DELETE_PAGE 1201
93 #define ID_NEXT_PAGE 1202
94