]> git.saurik.com Git - wxWidgets.git/blame_incremental - samples/layout/layout.h
Added version test
[wxWidgets.git] / samples / layout / layout.h
... / ...
CommitLineData
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
13class MyApp: public wxApp
14{
15public:
16 MyApp();
17 bool OnInit();
18};
19
20// the main frame class
21class MyFrame : public wxFrame
22{
23public:
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
33private:
34 DECLARE_EVENT_TABLE()
35};
36
37// a frame using flex sizers for layout
38class MyFlexSizerFrame : public wxFrame
39{
40public:
41 MyFlexSizerFrame(const wxChar *title, int x, int y );
42
43private:
44 void InitFlexSizer(wxFlexGridSizer *sizer);
45};
46
47
48// a dialog using notebook sizer for layout
49class MySizerDialog : public wxDialog
50{
51public:
52 MySizerDialog(wxWindow *parent, const wxChar *title);
53};
54
55
56// a frame using wxGridBagSizer for layout
57class MyGridBagSizerFrame : public wxFrame
58{
59public:
60 MyGridBagSizerFrame(const wxChar *title, int x, int y );
61
62 void OnHideBtn(wxCommandEvent&);
63 void OnShowBtn(wxCommandEvent&);
64 void OnMoveBtn(wxCommandEvent&);
65
66private:
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
85enum
86{
87 LAYOUT_QUIT = 100,
88 LAYOUT_ABOUT,
89 LAYOUT_TEST_SIZER,
90 LAYOUT_TEST_NB_SIZER,
91 LAYOUT_TEST_GB_SIZER
92};
93