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