]>
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 OnFullScreen(wxCommandEvent
& event
);
55 void OnQuit(wxCommandEvent
& event
);
56 void OnCloseAll(wxCommandEvent
& event
);
58 void OnClose(wxCloseEvent
& event
);
60 wxTextCtrl
*m_textWindow
;
65 class MyChild
: public wxMDIChildFrame
68 MyChild(wxMDIParentFrame
*parent
);
71 static unsigned GetChildrenCount() { return ms_numChildren
; }
74 void OnActivate(wxActivateEvent
& event
);
76 void OnRefresh(wxCommandEvent
& event
);
77 void OnUpdateRefresh(wxUpdateUIEvent
& event
);
78 void OnChangeTitle(wxCommandEvent
& event
);
79 void OnChangePosition(wxCommandEvent
& event
);
80 void OnChangeSize(wxCommandEvent
& event
);
81 void OnClose(wxCommandEvent
& event
);
82 void OnSize(wxSizeEvent
& event
);
83 void OnMove(wxMoveEvent
& event
);
84 void OnCloseWindow(wxCloseEvent
& event
);
87 void OnPaste(wxCommandEvent
& event
);
88 void OnUpdatePaste(wxUpdateUIEvent
& event
);
89 #endif // wxUSE_CLIPBOARD
91 static unsigned ms_numChildren
;