]>
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
48 static wxMenuBar
*CreateMainMenubar();
51 void InitToolBar(wxToolBar
* toolBar
);
53 void OnSize(wxSizeEvent
& event
);
54 void OnAbout(wxCommandEvent
& event
);
55 void OnNewWindow(wxCommandEvent
& event
);
56 void OnFullScreen(wxCommandEvent
& event
);
57 void OnQuit(wxCommandEvent
& event
);
58 void OnCloseAll(wxCommandEvent
& event
);
60 void OnClose(wxCloseEvent
& event
);
62 wxTextCtrl
*m_textWindow
;
67 class MyChild
: public wxMDIChildFrame
70 MyChild(wxMDIParentFrame
*parent
);
73 static unsigned GetChildrenCount() { return ms_numChildren
; }
76 void OnActivate(wxActivateEvent
& event
);
78 void OnRefresh(wxCommandEvent
& event
);
79 void OnUpdateRefresh(wxUpdateUIEvent
& event
);
80 void OnChangeTitle(wxCommandEvent
& event
);
81 void OnChangePosition(wxCommandEvent
& event
);
82 void OnChangeSize(wxCommandEvent
& event
);
83 void OnClose(wxCommandEvent
& event
);
84 void OnSize(wxSizeEvent
& event
);
85 void OnMove(wxMoveEvent
& event
);
86 void OnCloseWindow(wxCloseEvent
& event
);
89 void OnPaste(wxCommandEvent
& event
);
90 void OnUpdatePaste(wxUpdateUIEvent
& event
);
91 #endif // wxUSE_CLIPBOARD
93 static unsigned ms_numChildren
;
103 MDI_FULLSCREEN
= 100,