]>
git.saurik.com Git - wxWidgets.git/blob - samples/mdi/mdi.h
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
12 #include "wx/toolbar.h"
14 // Define a new application
15 class MyApp
: public wxApp
18 virtual bool OnInit();
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 SetText(const wxString
& text
) { m_text
= text
; Refresh(); }
32 void OnEvent(wxMouseEvent
& event
);
42 class MyFrame
: public wxMDIParentFrame
49 void InitToolBar(wxToolBar
* toolBar
);
51 void OnSize(wxSizeEvent
& event
);
52 void OnAbout(wxCommandEvent
& event
);
53 void OnNewWindow(wxCommandEvent
& event
);
54 void OnQuit(wxCommandEvent
& event
);
55 void OnClose(wxCloseEvent
& event
);
57 wxTextCtrl
*m_textWindow
;
62 class MyChild
: public wxMDIChildFrame
65 MyChild(wxMDIParentFrame
*parent
);
68 static unsigned GetChildrenCount() { return ms_numChildren
; }
71 void OnActivate(wxActivateEvent
& event
);
73 void OnRefresh(wxCommandEvent
& event
);
74 void OnUpdateRefresh(wxUpdateUIEvent
& event
);
75 void OnChangeTitle(wxCommandEvent
& event
);
76 void OnChangePosition(wxCommandEvent
& event
);
77 void OnChangeSize(wxCommandEvent
& event
);
78 void OnClose(wxCommandEvent
& event
);
79 void OnSize(wxSizeEvent
& event
);
80 void OnMove(wxMoveEvent
& event
);
81 void OnCloseWindow(wxCloseEvent
& event
);
84 void OnPaste(wxCommandEvent
& event
);
85 void OnUpdatePaste(wxUpdateUIEvent
& event
);
86 #endif // wxUSE_CLIPBOARD
88 static unsigned ms_numChildren
;