]>
git.saurik.com Git - wxWidgets.git/blob - samples/notebook/test.h
33b31a06af06ed81d786486886a861b4c1d1cc32
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
;
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 OnNextPage(wxCommandEvent
& event
);
59 void OnDeletePage(wxCommandEvent
& event
);
60 void OnIdle(wxIdleEvent
& event
);
65 wxNotebook
* m_notebook
;
66 wxPanel
* m_panel
; // Panel containing notebook and OK/Cancel/Help
71 #endif // USE_TABBED_DIALOG
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
90 #define ID_NOTEBOOK 1000
91 #define ID_ADD_PAGE 1200
92 #define ID_DELETE_PAGE 1201
93 #define ID_NEXT_PAGE 1202