]>
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
);
26 void OnEvent(wxMouseEvent
& event
);
31 class TestRibbon
: public wxToolBar
34 TestRibbon(wxFrame
*frame
, int x
= 0, int y
= 0, int w
= -1, int h
= -1,
35 long style
= wxNO_BORDER
, int direction
= wxVERTICAL
, int RowsOrColumns
= 2);
36 bool OnLeftClick(int toolIndex
, bool toggled
);
37 void OnMouseEnter(int toolIndex
);
38 void OnPaint(wxPaintEvent
& event
);
44 class MyFrame
: public wxMDIParentFrame
47 wxTextCtrl
*textWindow
;
51 MyFrame(wxWindow
*parent
, const wxWindowID id
, const wxString
& title
, const wxPoint
& pos
, const wxSize
& size
, const long style
);
53 void OnSize(wxSizeEvent
& event
);
54 void OnAbout(wxCommandEvent
& event
);
55 void OnNewWindow(wxCommandEvent
& event
);
56 void OnQuit(wxCommandEvent
& event
);
61 class MyChild
: public wxMDIChildFrame
65 MyChild(wxMDIParentFrame
*parent
, const wxString
& title
, const wxPoint
& pos
, const wxSize
& size
, const long style
);
68 void OnSize(wxSizeEvent
& event
);
69 void OnActivate(wxActivateEvent
& event
);
70 void OnQuit(wxCommandEvent
& event
);
76 #define MDI_NEW_WINDOW 2
78 #define MDI_CHILD_QUIT 4