]> git.saurik.com Git - wxWidgets.git/blob - user/wxTest/wxTest.h
made the log dialog resizeable (again?)
[wxWidgets.git] / user / wxTest / wxTest.h
1 /*
2 * Program: wxTest
3 *
4 * Author: Robert Roebling
5 *
6 * Copyright: (C) 1997, GNU (Robert Roebling)
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 */
22
23 #ifndef __TESTH__
24 #define __TESTH__
25
26 #ifdef __GNUG__
27 #pragma interface
28 #endif
29
30 #include "wx/wx.h"
31 #include "wx/dcscreen.h"
32 #include "wx/splitter.h"
33 #include "wx/toolbar.h"
34 #include "wx/fontdlg.h"
35
36 //-----------------------------------------------------------------------------
37 // derived classes
38 //-----------------------------------------------------------------------------
39
40 class MyDialog;
41 class MyFrame;
42 class MyApp;
43
44 //-----------------------------------------------------------------------------
45 // MyTimer
46 //-----------------------------------------------------------------------------
47
48 class MyTimer: public wxTimer
49 {
50 public:
51
52 MyTimer(void) {};
53 void Notify(void)
54 {
55 printf( "OnTimer.\n" );
56 };
57 };
58
59 //-----------------------------------------------------------------------------
60 // MyDialog
61 //-----------------------------------------------------------------------------
62
63 class MyDialog: public wxDialog
64 {
65 DECLARE_DYNAMIC_CLASS(MyDialog)
66
67 public:
68
69 MyDialog(void) {};
70 MyDialog( wxWindow *parent );
71
72 void OnReturnButton( wxCommandEvent &event );
73 void OnHelloButton( wxCommandEvent &event );
74
75 void OnCheckBox( wxCommandEvent &event );
76 void OnCheckBoxButtons( wxCommandEvent &event );
77
78 void OnTextCtrl( wxCommandEvent &event );
79 void OnTextCtrlButtons( wxCommandEvent &event );
80
81 void OnChoice( wxCommandEvent &event );
82 void OnChoiceButtons( wxCommandEvent &event );
83
84 void OnListBox( wxCommandEvent &event );
85 void OnListBoxButtons( wxCommandEvent &event );
86
87 void OnRadioBox( wxCommandEvent &event );
88 void OnRadioBoxButtons( wxCommandEvent &event );
89
90 wxCheckBox *m_checkbox;
91 wxTextCtrl *m_textctrl;
92 wxChoice *m_choice;
93 wxListBox *m_listbox;
94 wxRadioBox *m_radiobox;
95 wxStaticText *m_text1;
96 wxStaticText *m_text2;
97
98 DECLARE_EVENT_TABLE()
99 };
100
101 //-----------------------------------------------------------------------------
102 // MyCanvas
103 //-----------------------------------------------------------------------------
104
105 class MyCanvas: public wxScrolledWindow
106 {
107 DECLARE_DYNAMIC_CLASS(MyCanvas)
108
109 public:
110
111 MyCanvas(void) {};
112 MyCanvas( wxWindow *parent, wxWindowID, const wxPoint &pos, const wxSize &size );
113 ~MyCanvas(void);
114 void OnPaint( wxPaintEvent &event );
115
116 wxBitmap *my_bitmap;
117 wxBitmap *my_horse;
118 wxBitmap *my_backstore;
119 wxFont *my_font;
120 bool m_isCreated;
121
122 DECLARE_EVENT_TABLE()
123 };
124
125 //-----------------------------------------------------------------------------
126 // MyFrame
127 //-----------------------------------------------------------------------------
128
129 class MyFrame: public wxFrame
130 {
131 DECLARE_DYNAMIC_CLASS(MyFrame)
132
133 public:
134
135 MyFrame(void);
136 void OnSize( wxSizeEvent &event );
137 void OnOpenDialog( wxCommandEvent &event );
138 void OnFontDialog( wxCommandEvent &event );
139 void OnMsg( wxCommandEvent &event );
140 void OnDialog( wxCommandEvent &event );
141 void OnAbout( wxCommandEvent &event );
142 void OnQuit( wxCommandEvent &event );
143
144 wxToolBar *m_tb;
145 MyCanvas *m_canvas;
146
147 MyTimer m_timer;
148
149 DECLARE_EVENT_TABLE()
150 };
151
152 //-----------------------------------------------------------------------------
153 // MyApp
154 //-----------------------------------------------------------------------------
155
156 class MyApp: public wxApp
157 {
158 public:
159
160 MyApp(void);
161 virtual bool OnInit(void);
162 };
163
164 #endif // wxGTK_h