]> git.saurik.com Git - wxWidgets.git/blob - samples/tab/tab.h
Replaced /'s with \'s as BCC requires \'s for path names
[wxWidgets.git] / samples / tab / tab.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: tab.h
3 // Purpose: Tab demo
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 01/02/97
7 // RCS-ID: $Id$
8 // Copyright: (c)
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 // Define a new application
13 class MyApp: public wxApp
14 {
15 public:
16 bool OnInit(void);
17 void InitTabView(wxPanelTabView* view, wxWindow* window);
18
19 wxButton* m_okButton;
20 wxButton* m_cancelButton;
21 wxButton* m_helpButton;
22 };
23
24 DECLARE_APP(MyApp)
25
26 class MyDialog: public wxTabbedDialog
27 {
28 public:
29 MyDialog(wxWindow* parent, const wxWindowID id, const wxString& title,
30 const wxPoint& pos, const wxSize& size, const long windowStyle = wxDEFAULT_DIALOG_STYLE);
31
32 void OnOK(wxCommandEvent& event);
33 void OnCloseWindow(wxCloseEvent& event);
34 void Init(void);
35
36 DECLARE_EVENT_TABLE()
37 };
38
39 class MyFrame: public wxFrame
40 {
41 public:
42 MyFrame(wxFrame* parent, const wxWindowID id, const wxString& title,
43 const wxPoint& pos, const wxSize& size, const long windowStyle = wxDEFAULT_FRAME_STYLE);
44
45 void OnOK(wxCommandEvent& event);
46 void OnCloseWindow(wxCloseEvent& event);
47 void OnSize(wxSizeEvent& event);
48 void Init(void);
49 protected:
50 wxTabbedPanel* m_panel;
51 wxPanelTabView* m_view;
52
53 DECLARE_EVENT_TABLE()
54 };
55
56
57 class MyTabbedPanel: public wxTabbedPanel
58 {
59 public:
60 MyTabbedPanel(wxWindow* parent, const wxWindowID id,
61 const wxPoint& pos, const wxSize& size, const long windowStyle = 0);
62
63 void OnOK(wxCommandEvent& event);
64 void OnCloseWindow(wxCloseEvent& event);
65 // void OnAbout(wxCommandEvent& event);
66 void Init(void);
67
68 DECLARE_EVENT_TABLE()
69 };
70
71 // File ids
72 #define TEST_ABOUT 2
73
74 // Tab ids
75 #define TEST_TAB_DOG 1
76 #define TEST_TAB_CAT 2
77 #define TEST_TAB_GOAT 3
78 #define TEST_TAB_GUINEAPIG 4
79 #define TEST_TAB_ANTEATER 5
80 #define TEST_TAB_HUMMINGBIRD 6
81 #define TEST_TAB_SHEEP 7
82 #define TEST_TAB_COW 8
83 #define TEST_TAB_HORSE 9
84 #define TEST_TAB_PIG 10
85 #define TEST_TAB_OSTRICH 11
86 #define TEST_TAB_AARDVARK 12
87