]> git.saurik.com Git - wxWidgets.git/blame - samples/layout/layout.h
corrections to dynamic loading for Darwin
[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
9// Licence: wxWindows license
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:
c801d85f
KB
27 wxPanel *panel;
28 MyTextWindow *text_window;
29 MyWindow *canvas;
30 MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h);
31 void OnSize(wxSizeEvent& event);
c801d85f
KB
32 void Draw(wxDC& dc, bool draw_bitmaps = TRUE);
33
34 void LoadFile(wxCommandEvent& event);
35 void Quit(wxCommandEvent& event);
83edc0a5
RR
36 void TestSizers(wxCommandEvent& event);
37 void TestNotebookSizers(wxCommandEvent& event);
c801d85f
KB
38 void About(wxCommandEvent& event);
39
83edc0a5
RR
40private:
41 DECLARE_EVENT_TABLE()
c801d85f
KB
42};
43
44// Define a new text subwindow that can respond to drag-and-drop
45class MyTextWindow: public wxTextCtrl
46{
83edc0a5
RR
47public:
48 MyTextWindow(wxFrame *frame, int x=-1, int y=-1, int width=-1, int height=-1,
c801d85f
KB
49 long style=wxTE_MULTILINE):
50 wxTextCtrl(frame, -1, "", wxPoint(x, y), wxSize(width, height), style)
83edc0a5
RR
51 {
52 }
53
c801d85f
KB
54};
55
56// Define a new canvas which can receive some events
57class MyWindow: public wxWindow
58{
83edc0a5 59public:
c801d85f 60 MyWindow(wxFrame *frame, int x, int y, int w, int h, long style = wxRETAINED);
83edc0a5 61 ~MyWindow();
c801d85f 62 void OnPaint(wxPaintEvent& event);
83edc0a5
RR
63
64private:
c801d85f
KB
65 DECLARE_EVENT_TABLE()
66};
67
83edc0a5 68class MySizerFrame: public wxFrame
c62ac5b6 69{
83edc0a5 70public:
c62ac5b6 71 wxPanel *panel;
83edc0a5 72 MySizerFrame(wxFrame *frame, char *title, int x, int y );
c62ac5b6
RR
73};
74
c801d85f
KB
75#define LAYOUT_QUIT 100
76#define LAYOUT_TEST 101
77#define LAYOUT_ABOUT 102
78#define LAYOUT_LOAD_FILE 103
83edc0a5
RR
79#define LAYOUT_TEST_SIZER 104
80#define LAYOUT_TEST_NB 105