X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/33d0b396b23cc198d6966d2ae4bd03762821e56c..42a91fcebcbb6297014bdde7bc8ecf4b80c812be:/samples/mdi/mdi.h diff --git a/samples/mdi/mdi.h b/samples/mdi/mdi.h index 47d61ee24e..7415c60585 100644 --- a/samples/mdi/mdi.h +++ b/samples/mdi/mdi.h @@ -9,13 +9,7 @@ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// -#ifdef __WXMSW__ -#ifdef __WIN95__ -#define wxToolBar wxToolBar95 -#else -#define wxToolBar wxToolBarMSW -#endif -#endif +#include // Define a new application class MyApp: public wxApp @@ -34,33 +28,16 @@ class MyCanvas: public wxScrolledWindow DECLARE_EVENT_TABLE() }; -#ifdef __WXMSW__ - -class TestRibbon: public wxToolBar -{ - public: - TestRibbon(wxFrame *frame, int x = 0, int y = 0, int w = -1, int h = -1, - long style = wxNO_BORDER, int direction = wxVERTICAL, int RowsOrColumns = 2); - bool OnLeftClick(int toolIndex, bool toggled); - void OnMouseEnter(int toolIndex); - void OnPaint(wxPaintEvent& event); - - DECLARE_EVENT_TABLE() -}; - -#endif - // Define a new frame class MyFrame: public wxMDIParentFrame { public: wxTextCtrl *textWindow; -#ifdef __WXMSW__ - TestRibbon* toolBar; -#endif - MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, const long style); + + void InitToolBar(wxToolBar* toolBar); + bool OnClose(void); void OnSize(wxSizeEvent& event); void OnAbout(wxCommandEvent& event); @@ -77,7 +54,6 @@ class MyChild: public wxMDIChildFrame MyChild(wxMDIParentFrame *parent, const wxString& title, const wxPoint& pos, const wxSize& size, const long style); ~MyChild(void); bool OnClose(void); - void OnSize(wxSizeEvent& event); void OnActivate(wxActivateEvent& event); void OnQuit(wxCommandEvent& event);