]>
git.saurik.com Git - wxWidgets.git/blob - samples/mdi/mdi.h
47d61ee24eb57ed6d29a8aa8d2eda899b1623ab3
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart and Markus Holzem
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
14 #define wxToolBar wxToolBar95
16 #define wxToolBar wxToolBarMSW
20 // Define a new application
21 class MyApp
: public wxApp
27 class MyCanvas
: public wxScrolledWindow
30 MyCanvas(wxWindow
*parent
, const wxPoint
& pos
, const wxSize
& size
);
31 virtual void OnDraw(wxDC
& dc
);
32 void OnEvent(wxMouseEvent
& event
);
39 class TestRibbon
: public wxToolBar
42 TestRibbon(wxFrame
*frame
, int x
= 0, int y
= 0, int w
= -1, int h
= -1,
43 long style
= wxNO_BORDER
, int direction
= wxVERTICAL
, int RowsOrColumns
= 2);
44 bool OnLeftClick(int toolIndex
, bool toggled
);
45 void OnMouseEnter(int toolIndex
);
46 void OnPaint(wxPaintEvent
& event
);
54 class MyFrame
: public wxMDIParentFrame
57 wxTextCtrl
*textWindow
;
63 MyFrame(wxWindow
*parent
, const wxWindowID id
, const wxString
& title
, const wxPoint
& pos
, const wxSize
& size
, const long style
);
65 void OnSize(wxSizeEvent
& event
);
66 void OnAbout(wxCommandEvent
& event
);
67 void OnNewWindow(wxCommandEvent
& event
);
68 void OnQuit(wxCommandEvent
& event
);
73 class MyChild
: public wxMDIChildFrame
77 MyChild(wxMDIParentFrame
*parent
, const wxString
& title
, const wxPoint
& pos
, const wxSize
& size
, const long style
);
80 void OnSize(wxSizeEvent
& event
);
81 void OnActivate(wxActivateEvent
& event
);
82 void OnQuit(wxCommandEvent
& event
);
88 #define MDI_NEW_WINDOW 2
90 #define MDI_CHILD_QUIT 4