]>
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 // Define a new application
13 class MyApp
: public wxApp
19 class MyCanvas
: public wxScrolledWindow
22 MyCanvas(wxWindow
*parent
, const wxPoint
& pos
, const wxSize
& size
);
23 virtual void OnDraw(wxDC
& dc
);
24 void OnEvent(wxMouseEvent
& event
);
31 class TestRibbon
: public wxToolBar95
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
);
46 class MyFrame
: public wxMDIParentFrame
49 wxTextCtrl
*textWindow
;
55 MyFrame(wxWindow
*parent
, const wxWindowID id
, const wxString
& title
, const wxPoint
& pos
, const wxSize
& size
, const long style
);
57 void OnSize(wxSizeEvent
& event
);
58 void OnAbout(wxCommandEvent
& event
);
59 void OnNewWindow(wxCommandEvent
& event
);
60 void OnQuit(wxCommandEvent
& event
);
65 class MyChild
: public wxMDIChildFrame
69 MyChild(wxMDIParentFrame
*parent
, const wxString
& title
, const wxPoint
& pos
, const wxSize
& size
, const long style
);
72 void OnActivate(wxActivateEvent
& event
);
73 void OnQuit(wxCommandEvent
& event
);
79 #define MDI_NEW_WINDOW 2
81 #define MDI_CHILD_QUIT 4