]> git.saurik.com Git - wxWidgets.git/blob - samples/notebook/notebook.h
fixed mouse input handling in wxUniv: the static boxes ust be transparent
[wxWidgets.git] / samples / notebook / notebook.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: notebook.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();
19 void InitTabView(wxNotebook* notebook, wxWindow* window);
20
21 wxButton* m_okButton;
22 wxButton* m_cancelButton;
23 wxButton* m_addPageButton, *m_insertPageButton;
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();
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 OnInsertPage(wxCommandEvent& event);
59 void OnNextPage(wxCommandEvent& event);
60 void OnDeletePage(wxCommandEvent& event);
61 void OnIdle(wxIdleEvent& event);
62
63 void Init();
64
65 protected:
66 wxNotebook* m_notebook;
67 wxPanel* m_panel; // Panel containing notebook and OK/Cancel/Help
68
69 DECLARE_EVENT_TABLE()
70 };
71
72 #endif // USE_TABBED_DIALOG
73
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
92 #define ID_ADD_PAGE 1200
93 #define ID_DELETE_PAGE 1201
94 #define ID_NEXT_PAGE 1202
95 #define ID_INSERT_PAGE 1203
96