]>
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) | |
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, wxWindow* window); | |
20 | ||
21 | wxButton* m_okButton; | |
22 | wxButton* m_cancelButton; | |
326f9654 | 23 | wxButton* m_addPageButton; |
0b4d4194 JS |
24 | }; |
25 | ||
26 | DECLARE_APP(MyApp) | |
27 | ||
28 | class MyDialog: public wxDialog | |
29 | { | |
30 | public: | |
31 | MyDialog(wxWindow* parent, const wxWindowID id, const wxString& title, | |
32 | const wxPoint& pos, const wxSize& size, const long windowStyle = wxDEFAULT_DIALOG_STYLE); | |
33 | ||
34 | void OnOK(wxCommandEvent& event); | |
35 | void OnCloseWindow(wxCloseEvent& event); | |
36 | void Init(void); | |
37 | ||
38 | protected: | |
39 | wxNotebook* m_notebook; | |
40 | ||
41 | DECLARE_EVENT_TABLE() | |
42 | }; | |
43 | ||
44 | class MyFrame: public wxFrame | |
45 | { | |
46 | public: | |
47 | MyFrame(wxFrame* parent, const wxWindowID id, const wxString& title, | |
48 | const wxPoint& pos, const wxSize& size, const long windowStyle = wxDEFAULT_FRAME_STYLE); | |
49 | ||
50 | void OnOK(wxCommandEvent& event); | |
51 | void OnCloseWindow(wxCloseEvent& event); | |
326f9654 | 52 | void OnAddPage(wxCommandEvent& event); |
29f538ce | 53 | void OnDeletePage(wxCommandEvent& event); |
0b4d4194 | 54 | void OnSize(wxSizeEvent& event); |
96d37807 VZ |
55 | void OnIdle(wxIdleEvent& event); |
56 | ||
57 | void Init(); | |
58 | ||
0b4d4194 JS |
59 | protected: |
60 | wxNotebook* m_notebook; | |
61 | wxPanel* m_panel; // Panel containing notebook and OK/Cancel/Help | |
62 | ||
63 | DECLARE_EVENT_TABLE() | |
64 | }; | |
65 | ||
66 | // File ids | |
67 | #define TEST_ABOUT 2 | |
68 | ||
69 | // Tab ids | |
70 | #define TEST_TAB_DOG 1 | |
71 | #define TEST_TAB_CAT 2 | |
72 | #define TEST_TAB_GOAT 3 | |
73 | #define TEST_TAB_GUINEAPIG 4 | |
74 | #define TEST_TAB_ANTEATER 5 | |
75 | #define TEST_TAB_HUMMINGBIRD 6 | |
76 | #define TEST_TAB_SHEEP 7 | |
77 | #define TEST_TAB_COW 8 | |
78 | #define TEST_TAB_HORSE 9 | |
79 | #define TEST_TAB_PIG 10 | |
80 | #define TEST_TAB_OSTRICH 11 | |
81 | #define TEST_TAB_AARDVARK 12 | |
82 | ||
83 | #define ID_NOTEBOOK 1000 | |
326f9654 | 84 | #define ID_ADD_PAGE 1200 |
29f538ce | 85 | #define ID_DELETE_PAGE 1201 |
0b4d4194 | 86 |