]>
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
);
42 void OnSize(wxSizeEvent
& event
);
43 void OnAbout(wxCommandEvent
& event
);
44 void OnNewWindow(wxCommandEvent
& event
);
45 void OnQuit(wxCommandEvent
& event
);
50 class MyChild
: public wxMDIChildFrame
54 MyChild(wxMDIParentFrame
*parent
, const wxString
& title
, const wxPoint
& pos
, const wxSize
& size
, const long style
);
57 void OnActivate(wxActivateEvent
& event
);
58 void OnQuit(wxCommandEvent
& event
);
64 #define MDI_NEW_WINDOW 2
66 #define MDI_CHILD_QUIT 4