]>
Commit | Line | Data |
---|---|---|
0b4d4194 JS |
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) | |
d22699b5 | 9 | // Licence: wxWindows licence |
0b4d4194 JS |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #include <wx/notebook.h> | |
13 | ||
14 | // Define a new application | |
15 | class MyApp: public wxApp | |
16 | { | |
17 | public: | |
477350ce | 18 | bool OnInit(); |
d22699b5 | 19 | void InitTabView(wxNotebook* notebook, wxPanel* window); |
0b4d4194 JS |
20 | |
21 | wxButton* m_okButton; | |
22 | wxButton* m_cancelButton; | |
477350ce | 23 | wxButton* m_addPageButton, *m_insertPageButton; |
33d0e17c | 24 | wxButton* m_nextPageButton; |
0b4d4194 JS |
25 | }; |
26 | ||
27 | DECLARE_APP(MyApp) | |
28 | ||
d22699b5 VZ |
29 | #if USE_TABBED_DIALOG |
30 | ||
0b4d4194 JS |
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); | |
477350ce | 39 | void Init(); |
0b4d4194 JS |
40 | |
41 | protected: | |
42 | wxNotebook* m_notebook; | |
43 | ||
d22699b5 | 44 | DECLARE_EVENT_TABLE() |
0b4d4194 JS |
45 | }; |
46 | ||
d22699b5 VZ |
47 | #else // USE_TABBED_DIALOG |
48 | ||
0b4d4194 JS |
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); | |
326f9654 | 57 | void OnAddPage(wxCommandEvent& event); |
477350ce | 58 | void OnInsertPage(wxCommandEvent& event); |
33d0e17c | 59 | void OnNextPage(wxCommandEvent& event); |
29f538ce | 60 | void OnDeletePage(wxCommandEvent& event); |
96d37807 VZ |
61 | void OnIdle(wxIdleEvent& event); |
62 | ||
63 | void Init(); | |
64 | ||
0b4d4194 JS |
65 | protected: |
66 | wxNotebook* m_notebook; | |
67 | wxPanel* m_panel; // Panel containing notebook and OK/Cancel/Help | |
68 | ||
d22699b5 | 69 | DECLARE_EVENT_TABLE() |
0b4d4194 JS |
70 | }; |
71 | ||
d22699b5 VZ |
72 | #endif // USE_TABBED_DIALOG |
73 | ||
0b4d4194 JS |
74 | // File ids |
75 | #define TEST_ABOUT 2 | |
76 | ||
77 | // Tab ids | |
78 | #define TEST_TAB_DOG 1 | |
79 | #define TEST_TAB_CAT 2 | |
80 | #define TEST_TAB_GOAT 3 | |
81 | #define TEST_TAB_GUINEAPIG 4 | |
82 | #define TEST_TAB_ANTEATER 5 | |
83 | #define TEST_TAB_HUMMINGBIRD 6 | |
84 | #define TEST_TAB_SHEEP 7 | |
85 | #define TEST_TAB_COW 8 | |
86 | #define TEST_TAB_HORSE 9 | |
87 | #define TEST_TAB_PIG 10 | |
88 | #define TEST_TAB_OSTRICH 11 | |
89 | #define TEST_TAB_AARDVARK 12 | |
90 | ||
91 | #define ID_NOTEBOOK 1000 | |
326f9654 | 92 | #define ID_ADD_PAGE 1200 |
29f538ce | 93 | #define ID_DELETE_PAGE 1201 |
33d0e17c | 94 | #define ID_NEXT_PAGE 1202 |
477350ce | 95 | #define ID_INSERT_PAGE 1203 |
0b4d4194 | 96 |