]> git.saurik.com Git - wxWidgets.git/blame - samples/layout/layout.h
Added the forgotten file txtstrm.tex
[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{
15 public:
16 MyApp(void) ;
17 bool OnInit(void);
18};
19
20// Define a new frame
21class MyTextWindow;
22class MyWindow;
23
24class MyFrame: public wxFrame
25{
26 public:
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);
36 void TestSizers(wxCommandEvent& event);
37 void About(wxCommandEvent& event);
38
39 DECLARE_EVENT_TABLE()
40};
41
42// Define a new text subwindow that can respond to drag-and-drop
43class MyTextWindow: public wxTextCtrl
44{
45 public:
46 MyTextWindow(wxFrame *frame, int x=-1, int y=-1, int width=-1, int height=-1,
47 long style=wxTE_MULTILINE):
48 wxTextCtrl(frame, -1, "", wxPoint(x, y), wxSize(width, height), style)
49 {
50 }
51};
52
53// Define a new canvas which can receive some events
54class MyWindow: public wxWindow
55{
56 public:
57 MyWindow(wxFrame *frame, int x, int y, int w, int h, long style = wxRETAINED);
58 ~MyWindow(void) ;
59 void OnPaint(wxPaintEvent& event);
60
61 DECLARE_EVENT_TABLE()
62};
63
64class SizerFrame: public wxFrame
65{
66 public:
67 wxPanel *panel;
68 SizerFrame(wxFrame *frame, char *title, int x, int y, int w, int h);
69 void OnSize(wxSizeEvent& event);
c801d85f
KB
70
71 DECLARE_EVENT_TABLE()
72};
73
74#define LAYOUT_QUIT 100
75#define LAYOUT_TEST 101
76#define LAYOUT_ABOUT 102
77#define LAYOUT_LOAD_FILE 103