]> git.saurik.com Git - wxWidgets.git/blob - samples/layout/layout.h
fixed Carbon compilo
[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
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 // the main frame class
21 class MyFrame : public wxFrame
22 {
23 public:
24 MyFrame();
25
26 void TestFlexSizers(wxCommandEvent& event);
27 void TestNotebookSizers(wxCommandEvent& event);
28 void TestGridBagSizer(wxCommandEvent& event);
29
30 void OnAbout(wxCommandEvent& event);
31 void OnQuit(wxCommandEvent& event);
32
33 private:
34 DECLARE_EVENT_TABLE()
35 };
36
37 // a frame using flex sizers for layout
38 class MyFlexSizerFrame : public wxFrame
39 {
40 public:
41 MyFlexSizerFrame(const wxChar *title, int x, int y );
42
43 private:
44 void InitFlexSizer(wxFlexGridSizer *sizer, wxWindow* parent);
45 };
46
47
48 // a dialog using notebook sizer for layout
49 class MySizerDialog : public wxDialog
50 {
51 public:
52 MySizerDialog(wxWindow *parent, const wxChar *title);
53 };
54
55
56 // a frame using wxGridBagSizer for layout
57 class MyGridBagSizerFrame : public wxFrame
58 {
59 public:
60 MyGridBagSizerFrame(const wxChar *title, int x, int y );
61
62 void OnHideBtn(wxCommandEvent&);
63 void OnShowBtn(wxCommandEvent&);
64 void OnMoveBtn(wxCommandEvent&);
65
66 private:
67 wxGridBagSizer* m_gbs;
68 wxPanel* m_panel;
69 wxButton* m_hideBtn;
70 wxButton* m_showBtn;
71 wxTextCtrl* m_hideTxt;
72
73 wxButton* m_moveBtn1;
74 wxButton* m_moveBtn2;
75 wxGBPosition m_lastPos;
76
77 DECLARE_EVENT_TABLE()
78 };
79
80
81
82
83
84 // controls and menu constants
85 enum
86 {
87 LAYOUT_QUIT = 100,
88 LAYOUT_ABOUT,
89 LAYOUT_TEST_SIZER,
90 LAYOUT_TEST_NB_SIZER,
91 LAYOUT_TEST_GB_SIZER
92 };
93