]> git.saurik.com Git - wxWidgets.git/blob - samples/layout/layout.h
added CarbonFrameworkLib to CodeWarrior 5 projects
[wxWidgets.git] / samples / layout / layout.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: layout.h
3 // Purpose: Layout sample
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 04/01/98
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart and Markus Holzem
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
11
12 // Define a new application
13 class MyApp: public wxApp
14 {
15 public:
16 MyApp();
17 bool OnInit();
18 };
19
20 // Define a new frame
21 class MyTextWindow;
22 class MyWindow;
23
24 class MyFrame: public wxFrame
25 {
26 public:
27 MyFrame(wxFrame *frame, const wxChar *title, int x, int y, int w, int h);
28
29 void OnQuit(wxCommandEvent& event);
30
31 void TestSizers(wxCommandEvent& event);
32 void TestNotebookSizers(wxCommandEvent& event);
33 void About(wxCommandEvent& event);
34
35 private:
36 DECLARE_EVENT_TABLE()
37 };
38
39 // Define a new text subwindow that can respond to drag-and-drop
40 class MyTextWindow: public wxTextCtrl
41 {
42 public:
43 MyTextWindow(wxFrame *frame, int x=-1, int y=-1, int width=-1, int height=-1,
44 long style=wxTE_MULTILINE):
45 wxTextCtrl(frame, -1, _T(""), wxPoint(x, y), wxSize(width, height), style)
46 {
47 }
48
49 };
50
51 // Define a new canvas which can receive some events
52 class MyWindow: public wxWindow
53 {
54 public:
55 MyWindow(wxFrame *frame, int x, int y, int w, int h, long style = wxRETAINED);
56 ~MyWindow();
57 void OnPaint(wxPaintEvent& event);
58
59 private:
60 DECLARE_EVENT_TABLE()
61 };
62
63 class MySizerFrame: public wxFrame
64 {
65 public:
66 wxPanel *panel;
67 MySizerFrame(wxFrame *frame, wxChar *title, int x, int y );
68 };
69
70 #define LAYOUT_QUIT 100
71 #define LAYOUT_TEST 101
72 #define LAYOUT_ABOUT 102
73 #define LAYOUT_TEST_SIZER 104
74 #define LAYOUT_TEST_NB 105