]> git.saurik.com Git - wxWidgets.git/blame - samples/layout/layout.h
Moved Clear() implementation into wxDC using a new virtual CocoaGetBounds()
[wxWidgets.git] / samples / layout / layout.h
CommitLineData
c801d85f
KB
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$
6aa89a22 8// Copyright: (c) Julian Smart
2f6c54eb 9// Licence: wxWindows license
c801d85f
KB
10/////////////////////////////////////////////////////////////////////////////
11
12// Define a new application
13class MyApp: public wxApp
14{
83edc0a5 15public:
925e9792 16 MyApp(){};
83edc0a5 17 bool OnInit();
c801d85f
KB
18};
19
9e023db7
VZ
20// the main frame class
21class MyFrame : public wxFrame
c801d85f 22{
83edc0a5 23public:
9e023db7 24 MyFrame();
c801d85f 25
9e023db7 26 void TestFlexSizers(wxCommandEvent& event);
83edc0a5 27 void TestNotebookSizers(wxCommandEvent& event);
20b35a69 28 void TestGridBagSizer(wxCommandEvent& event);
925e9792 29
9e023db7
VZ
30 void OnAbout(wxCommandEvent& event);
31 void OnQuit(wxCommandEvent& event);
c801d85f 32
83edc0a5
RR
33private:
34 DECLARE_EVENT_TABLE()
c801d85f
KB
35};
36
9e023db7
VZ
37// a frame using flex sizers for layout
38class MyFlexSizerFrame : public wxFrame
c801d85f 39{
83edc0a5 40public:
9e023db7 41 MyFlexSizerFrame(const wxChar *title, int x, int y );
83edc0a5 42
2b5f62a0 43private:
9e023db7 44 void InitFlexSizer(wxFlexGridSizer *sizer);
c801d85f
KB
45};
46
20b35a69 47
9e023db7
VZ
48// a dialog using notebook sizer for layout
49class MySizerDialog : public wxDialog
c62ac5b6 50{
83edc0a5 51public:
9e023db7
VZ
52 MySizerDialog(wxWindow *parent, const wxChar *title);
53};
54
20b35a69
RD
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&);
925e9792 65
20b35a69
RD
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;
925e9792 76
20b35a69
RD
77 DECLARE_EVENT_TABLE()
78};
79
80
81
82
83
84// controls and menu constants
9e023db7
VZ
85enum
86{
87 LAYOUT_QUIT = 100,
88 LAYOUT_ABOUT,
9e023db7 89 LAYOUT_TEST_SIZER,
20b35a69
RD
90 LAYOUT_TEST_NB_SIZER,
91 LAYOUT_TEST_GB_SIZER
c62ac5b6
RR
92};
93