]> git.saurik.com Git - wxWidgets.git/blame - samples/layout/layout.h
added proportion parameter to wxFlexGridSizer::AddGrowableRow/Col()
[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$
8// Copyright: (c) Julian Smart and Markus Holzem
2f6c54eb 9// Licence: wxWindows license
c801d85f
KB
10/////////////////////////////////////////////////////////////////////////////
11
12// Define a new application
13class MyApp: public wxApp
14{
83edc0a5
RR
15public:
16 MyApp();
17 bool OnInit();
c801d85f
KB
18};
19
20// Define a new frame
21class MyTextWindow;
22class MyWindow;
23
24class MyFrame: public wxFrame
25{
83edc0a5 26public:
42ed7532 27 MyFrame(wxFrame *frame, const wxChar *title, int x, int y, int w, int h);
2b5f62a0
VZ
28
29 void OnQuit(wxCommandEvent& event);
c801d85f 30
83edc0a5
RR
31 void TestSizers(wxCommandEvent& event);
32 void TestNotebookSizers(wxCommandEvent& event);
c801d85f
KB
33 void About(wxCommandEvent& event);
34
83edc0a5
RR
35private:
36 DECLARE_EVENT_TABLE()
c801d85f
KB
37};
38
39// Define a new text subwindow that can respond to drag-and-drop
40class MyTextWindow: public wxTextCtrl
41{
83edc0a5
RR
42public:
43 MyTextWindow(wxFrame *frame, int x=-1, int y=-1, int width=-1, int height=-1,
c801d85f 44 long style=wxTE_MULTILINE):
42ed7532 45 wxTextCtrl(frame, -1, _T(""), wxPoint(x, y), wxSize(width, height), style)
83edc0a5
RR
46 {
47 }
48
c801d85f
KB
49};
50
51// Define a new canvas which can receive some events
52class MyWindow: public wxWindow
53{
83edc0a5 54public:
c801d85f 55 MyWindow(wxFrame *frame, int x, int y, int w, int h, long style = wxRETAINED);
83edc0a5 56 ~MyWindow();
c801d85f 57 void OnPaint(wxPaintEvent& event);
83edc0a5 58
2b5f62a0 59private:
c801d85f
KB
60 DECLARE_EVENT_TABLE()
61};
62
83edc0a5 63class MySizerFrame: public wxFrame
c62ac5b6 64{
83edc0a5 65public:
c62ac5b6 66 wxPanel *panel;
42ed7532 67 MySizerFrame(wxFrame *frame, wxChar *title, int x, int y );
c62ac5b6
RR
68};
69
c801d85f
KB
70#define LAYOUT_QUIT 100
71#define LAYOUT_TEST 101
72#define LAYOUT_ABOUT 102
83edc0a5
RR
73#define LAYOUT_TEST_SIZER 104
74#define LAYOUT_TEST_NB 105