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
);
37 class TestRibbon
: public wxToolBar
40 TestRibbon(wxFrame
*frame
, int x
= 0, int y
= 0, int w
= -1, int h
= -1,
41 long style
= wxNO_BORDER
, int direction
= wxVERTICAL
, int RowsOrColumns
= 2);
42 bool OnLeftClick(int toolIndex
, bool toggled
);
43 void OnMouseEnter(int toolIndex
);
44 void OnPaint(wxPaintEvent
& event
);
50 class MyFrame
: public wxMDIParentFrame
53 wxTextCtrl
*textWindow
;
57 MyFrame(wxWindow
*parent
, const wxWindowID id
, const wxString
& title
, const wxPoint
& pos
, const wxSize
& size
, const long style
);
59 void OnSize(wxSizeEvent
& event
);
60 void OnAbout(wxCommandEvent
& event
);
61 void OnNewWindow(wxCommandEvent
& event
);
62 void OnQuit(wxCommandEvent
& event
);
67 class MyChild
: public wxMDIChildFrame
71 MyChild(wxMDIParentFrame
*parent
, const wxString
& title
, const wxPoint
& pos
, const wxSize
& size
, const long style
);
74 void OnSize(wxSizeEvent
& event
);
75 void OnActivate(wxActivateEvent
& event
);
76 void OnQuit(wxCommandEvent
& event
);
82 #define MDI_NEW_WINDOW 2
84 #define MDI_CHILD_QUIT 4