]>
git.saurik.com Git - wxWidgets.git/blob - samples/notebook/test.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxNotebook demo
4 // Author: Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #include <wx/notebook.h>
14 // Define a new application
15 class MyApp
: public wxApp
19 void InitTabView(wxNotebook
* notebook
, wxPanel
* window
);
22 wxButton
* m_cancelButton
;
23 wxButton
* m_addPageButton
, *m_insertPageButton
;
24 wxButton
* m_nextPageButton
;
31 class MyDialog
: public wxDialog
34 MyDialog(wxWindow
* parent
, const wxWindowID id
, const wxString
& title
,
35 const wxPoint
& pos
, const wxSize
& size
, const long windowStyle
= wxDEFAULT_DIALOG_STYLE
);
37 void OnOK(wxCommandEvent
& event
);
38 void OnCloseWindow(wxCloseEvent
& event
);
42 wxNotebook
* m_notebook
;
47 #else // USE_TABBED_DIALOG
49 class MyFrame
: public wxFrame
52 MyFrame(wxFrame
* parent
, const wxWindowID id
, const wxString
& title
,
53 const wxPoint
& pos
, const wxSize
& size
, const long windowStyle
= wxDEFAULT_FRAME_STYLE
);
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
);
66 wxNotebook
* m_notebook
;
67 wxPanel
* m_panel
; // Panel containing notebook and OK/Cancel/Help
72 #endif // USE_TABBED_DIALOG
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
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