]>
git.saurik.com Git - wxWidgets.git/blob - samples/mdi/mdi.h
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart and Markus Holzem
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
12 #include <wx/toolbar.h>
14 // Define a new application
15 class MyApp
: public wxApp
21 class MyCanvas
: public wxScrolledWindow
24 MyCanvas(wxWindow
*parent
, const wxPoint
& pos
, const wxSize
& size
);
25 virtual void OnDraw(wxDC
& dc
);
26 void OnEvent(wxMouseEvent
& event
);
32 class MyFrame
: public wxMDIParentFrame
35 wxTextCtrl
*textWindow
;
37 MyFrame(wxWindow
*parent
, const wxWindowID id
, const wxString
& title
, const wxPoint
& pos
, const wxSize
& size
, const long style
);
39 void InitToolBar(wxToolBar
* toolBar
);
41 void OnSize(wxSizeEvent
& event
);
42 void OnAbout(wxCommandEvent
& event
);
43 void OnNewWindow(wxCommandEvent
& event
);
44 void OnQuit(wxCommandEvent
& event
);
49 class MyChild
: public wxMDIChildFrame
53 MyChild(wxMDIParentFrame
*parent
, const wxString
& title
, const wxPoint
& pos
, const wxSize
& size
, const long style
);
55 void OnActivate(wxActivateEvent
& event
);
56 void OnQuit(wxCommandEvent
& event
);
62 #define MDI_NEW_WINDOW 2
64 #define MDI_CHILD_QUIT 4