]>
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
, wxWindow
* window
);
22 wxButton
* m_cancelButton
;
23 wxButton
* m_helpButton
;
28 class MyDialog
: public wxDialog
31 MyDialog(wxWindow
* parent
, const wxWindowID id
, const wxString
& title
,
32 const wxPoint
& pos
, const wxSize
& size
, const long windowStyle
= wxDEFAULT_DIALOG_STYLE
);
34 void OnOK(wxCommandEvent
& event
);
35 void OnCloseWindow(wxCloseEvent
& event
);
39 wxNotebook
* m_notebook
;
44 class MyFrame
: public wxFrame
47 MyFrame(wxFrame
* parent
, const wxWindowID id
, const wxString
& title
,
48 const wxPoint
& pos
, const wxSize
& size
, const long windowStyle
= wxDEFAULT_FRAME_STYLE
);
50 void OnOK(wxCommandEvent
& event
);
51 void OnCloseWindow(wxCloseEvent
& event
);
52 void OnSize(wxSizeEvent
& event
);
55 wxNotebook
* m_notebook
;
56 wxPanel
* m_panel
; // Panel containing notebook and OK/Cancel/Help
65 #define TEST_TAB_DOG 1
66 #define TEST_TAB_CAT 2
67 #define TEST_TAB_GOAT 3
68 #define TEST_TAB_GUINEAPIG 4
69 #define TEST_TAB_ANTEATER 5
70 #define TEST_TAB_HUMMINGBIRD 6
71 #define TEST_TAB_SHEEP 7
72 #define TEST_TAB_COW 8
73 #define TEST_TAB_HORSE 9
74 #define TEST_TAB_PIG 10
75 #define TEST_TAB_OSTRICH 11
76 #define TEST_TAB_AARDVARK 12
78 #define ID_NOTEBOOK 1000