]> git.saurik.com Git - wxWidgets.git/blob - samples/mdi/mdi.h
Motif wxNotebook about done; added print/preview to OGLEdit sample
[wxWidgets.git] / samples / mdi / mdi.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: mdi.cpp
3 // Purpose: MDI 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 #include <wx/toolbar.h>
13
14 // Define a new application
15 class MyApp: public wxApp
16 {
17 public:
18 bool OnInit(void);
19 };
20
21 class MyCanvas: public wxScrolledWindow
22 {
23 public:
24 MyCanvas(wxWindow *parent, const wxPoint& pos, const wxSize& size);
25 virtual void OnDraw(wxDC& dc);
26 void OnEvent(wxMouseEvent& event);
27
28 DECLARE_EVENT_TABLE()
29 };
30
31 // Define a new frame
32 class MyFrame: public wxMDIParentFrame
33 {
34 public:
35 wxTextCtrl *textWindow;
36
37 MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, const long style);
38
39 void InitToolBar(wxToolBar* toolBar);
40
41 bool OnClose(void);
42 void OnSize(wxSizeEvent& event);
43 void OnAbout(wxCommandEvent& event);
44 void OnNewWindow(wxCommandEvent& event);
45 void OnQuit(wxCommandEvent& event);
46
47 DECLARE_EVENT_TABLE()
48 };
49
50 class MyChild: public wxMDIChildFrame
51 {
52 public:
53 MyCanvas *canvas;
54 MyChild(wxMDIParentFrame *parent, const wxString& title, const wxPoint& pos, const wxSize& size, const long style);
55 ~MyChild(void);
56 bool OnClose(void);
57 void OnActivate(wxActivateEvent& event);
58 void OnQuit(wxCommandEvent& event);
59
60 DECLARE_EVENT_TABLE()
61 };
62
63 #define MDI_QUIT 1
64 #define MDI_NEW_WINDOW 2
65 #define MDI_REFRESH 3
66 #define MDI_CHILD_QUIT 4
67 #define MDI_ABOUT 5