]>
Commit | Line | Data |
---|---|---|
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 | |
13 | class MyApp: public wxApp | |
14 | { | |
83edc0a5 RR |
15 | public: |
16 | MyApp(); | |
17 | bool OnInit(); | |
c801d85f KB |
18 | }; |
19 | ||
9e023db7 VZ |
20 | // the main frame class |
21 | class MyFrame : public wxFrame | |
c801d85f | 22 | { |
83edc0a5 | 23 | public: |
9e023db7 | 24 | MyFrame(); |
c801d85f | 25 | |
9e023db7 VZ |
26 | void TestConstraints(wxCommandEvent& event); |
27 | void TestFlexSizers(wxCommandEvent& event); | |
83edc0a5 | 28 | void TestNotebookSizers(wxCommandEvent& event); |
9e023db7 VZ |
29 | |
30 | void OnAbout(wxCommandEvent& event); | |
31 | void OnQuit(wxCommandEvent& event); | |
c801d85f | 32 | |
83edc0a5 RR |
33 | private: |
34 | DECLARE_EVENT_TABLE() | |
c801d85f KB |
35 | }; |
36 | ||
9e023db7 VZ |
37 | // a frame using constraints for layout |
38 | class MyConstraintsFrame : public wxFrame | |
c801d85f | 39 | { |
83edc0a5 | 40 | public: |
9e023db7 | 41 | MyConstraintsFrame(const wxChar *title, int x, int y ); |
c801d85f KB |
42 | }; |
43 | ||
9e023db7 VZ |
44 | // a frame using flex sizers for layout |
45 | class MyFlexSizerFrame : public wxFrame | |
c801d85f | 46 | { |
83edc0a5 | 47 | public: |
9e023db7 | 48 | MyFlexSizerFrame(const wxChar *title, int x, int y ); |
83edc0a5 | 49 | |
2b5f62a0 | 50 | private: |
9e023db7 | 51 | void InitFlexSizer(wxFlexGridSizer *sizer); |
c801d85f KB |
52 | }; |
53 | ||
9e023db7 VZ |
54 | // a dialog using notebook sizer for layout |
55 | class MySizerDialog : public wxDialog | |
c62ac5b6 | 56 | { |
83edc0a5 | 57 | public: |
9e023db7 VZ |
58 | MySizerDialog(wxWindow *parent, const wxChar *title); |
59 | }; | |
60 | ||
61 | // controls an menu constants | |
62 | enum | |
63 | { | |
64 | LAYOUT_QUIT = 100, | |
65 | LAYOUT_ABOUT, | |
66 | LAYOUT_TEST_CONSTRAINTS, | |
67 | LAYOUT_TEST_SIZER, | |
68 | LAYOUT_TEST_NB_SIZER | |
c62ac5b6 RR |
69 | }; |
70 |