]>
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
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
);
31 void SetText(const wxString
& text
) { m_text
= text
; Refresh(); }
42 class MyFrame
: public wxMDIParentFrame
45 wxTextCtrl
*textWindow
;
47 MyFrame(wxWindow
*parent
, const wxWindowID id
, const wxString
& title
,
48 const wxPoint
& pos
, const wxSize
& size
, const long style
);
50 void InitToolBar(wxToolBar
* toolBar
);
52 void OnSize(wxSizeEvent
& event
);
53 void OnAbout(wxCommandEvent
& event
);
54 void OnNewWindow(wxCommandEvent
& event
);
55 void OnQuit(wxCommandEvent
& event
);
56 void OnClose(wxCloseEvent
& event
);
61 class MyChild
: public wxMDIChildFrame
65 MyChild(wxMDIParentFrame
*parent
, const wxString
& title
);
68 void OnActivate(wxActivateEvent
& event
);
70 void OnRefresh(wxCommandEvent
& event
);
71 void OnUpdateRefresh(wxUpdateUIEvent
& event
);
72 void OnChangeTitle(wxCommandEvent
& event
);
73 void OnChangePosition(wxCommandEvent
& event
);
74 void OnChangeSize(wxCommandEvent
& event
);
75 void OnQuit(wxCommandEvent
& event
);
76 void OnSize(wxSizeEvent
& event
);
77 void OnMove(wxMoveEvent
& event
);
78 void OnClose(wxCloseEvent
& event
);
81 void OnPaste(wxCommandEvent
& event
);
82 void OnUpdatePaste(wxUpdateUIEvent
& event
);
83 #endif // wxUSE_CLIPBOARD
98 MDI_ABOUT
= wxID_ABOUT