]>
git.saurik.com Git - wxWidgets.git/blob - samples/layout/layout.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Layout sample
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
12 // Define a new application
13 class MyApp
: public wxApp
20 // the main frame class
21 class MyFrame
: public wxFrame
26 void TestConstraints(wxCommandEvent
& event
);
27 void TestFlexSizers(wxCommandEvent
& event
);
28 void TestNotebookSizers(wxCommandEvent
& event
);
29 void TestGridBagSizer(wxCommandEvent
& event
);
31 void OnAbout(wxCommandEvent
& event
);
32 void OnQuit(wxCommandEvent
& event
);
38 // a frame using constraints for layout
39 class MyConstraintsFrame
: public wxFrame
42 MyConstraintsFrame(const wxChar
*title
, int x
, int y
);
45 // a frame using flex sizers for layout
46 class MyFlexSizerFrame
: public wxFrame
49 MyFlexSizerFrame(const wxChar
*title
, int x
, int y
);
52 void InitFlexSizer(wxFlexGridSizer
*sizer
);
56 // a dialog using notebook sizer for layout
57 class MySizerDialog
: public wxDialog
60 MySizerDialog(wxWindow
*parent
, const wxChar
*title
);
64 // a frame using wxGridBagSizer for layout
65 class MyGridBagSizerFrame
: public wxFrame
68 MyGridBagSizerFrame(const wxChar
*title
, int x
, int y
);
70 void OnHideBtn(wxCommandEvent
&);
71 void OnShowBtn(wxCommandEvent
&);
72 void OnMoveBtn(wxCommandEvent
&);
75 wxGridBagSizer
* m_gbs
;
79 wxTextCtrl
* m_hideTxt
;
83 wxGBPosition m_lastPos
;
92 // controls and menu constants
97 LAYOUT_TEST_CONSTRAINTS
,