]>
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 TestFlexSizers(wxCommandEvent
& event
);
27 void TestNotebookSizers(wxCommandEvent
& event
);
28 void TestGridBagSizer(wxCommandEvent
& event
);
30 void OnAbout(wxCommandEvent
& event
);
31 void OnQuit(wxCommandEvent
& event
);
37 // a frame using flex sizers for layout
38 class MyFlexSizerFrame
: public wxFrame
41 MyFlexSizerFrame(const wxChar
*title
, int x
, int y
);
44 void InitFlexSizer(wxFlexGridSizer
*sizer
, wxWindow
* parent
);
48 // a dialog using notebook sizer for layout
49 class MySizerDialog
: public wxDialog
52 MySizerDialog(wxWindow
*parent
, const wxChar
*title
);
56 // a frame using wxGridBagSizer for layout
57 class MyGridBagSizerFrame
: public wxFrame
60 MyGridBagSizerFrame(const wxChar
*title
, int x
, int y
);
62 void OnHideBtn(wxCommandEvent
&);
63 void OnShowBtn(wxCommandEvent
&);
64 void OnMoveBtn(wxCommandEvent
&);
67 wxGridBagSizer
* m_gbs
;
71 wxTextCtrl
* m_hideTxt
;
75 wxGBPosition m_lastPos
;
84 // controls and menu constants