]>
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
);
27 bool IsDirty() const { return m_dirty
; }
29 void OnEvent(wxMouseEvent
& event
);
38 class MyFrame
: public wxMDIParentFrame
41 wxTextCtrl
*textWindow
;
43 MyFrame(wxWindow
*parent
, const wxWindowID id
, const wxString
& title
,
44 const wxPoint
& pos
, const wxSize
& size
, const long style
);
46 void InitToolBar(wxToolBar
* toolBar
);
48 void OnSize(wxSizeEvent
& event
);
49 void OnAbout(wxCommandEvent
& event
);
50 void OnNewWindow(wxCommandEvent
& event
);
51 void OnQuit(wxCommandEvent
& event
);
52 void OnClose(wxCloseEvent
& event
);
57 class MyChild
: public wxMDIChildFrame
61 MyChild(wxMDIParentFrame
*parent
, const wxString
& title
, const wxPoint
& pos
, const wxSize
& size
, const long style
);
64 void OnActivate(wxActivateEvent
& event
);
66 void OnRefresh(wxCommandEvent
& event
);
67 void OnUpdateRefresh(wxUpdateUIEvent
& event
);
68 void OnChangeTitle(wxCommandEvent
& event
);
69 void OnChangePosition(wxCommandEvent
& event
);
70 void OnChangeSize(wxCommandEvent
& event
);
71 void OnQuit(wxCommandEvent
& event
);
72 void OnSize(wxSizeEvent
& event
);
73 void OnMove(wxMoveEvent
& event
);
74 void OnClose(wxCloseEvent
& event
);