X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8bbe427f8e5a2078b266e282453595b5a634d35c..1d61ebaca18624cadf455a8859c1d089db5e6a23:/samples/toolbar/test.h diff --git a/samples/toolbar/test.h b/samples/toolbar/test.h index dcea766cb8..82f8950011 100644 --- a/samples/toolbar/test.h +++ b/samples/toolbar/test.h @@ -11,44 +11,52 @@ // Define a new application class MyApp: public wxApp -{ - public: - bool OnInit(void); - bool InitToolbar(wxToolBar* toolBar); -}; - -class MyTimer : public wxTimer { public: - MyTimer(wxFrame *frame) { m_frame = frame; } - - virtual void Notify() { wxLogStatus(m_frame, "Timer arrived!"); } - -private: - wxFrame *m_frame; + bool OnInit(); + bool InitToolbar(wxToolBar* toolBar, bool smallicons = FALSE); }; // Define a new frame class MyFrame: public wxFrame { public: - MyFrame(wxFrame *parent, wxWindowID id = -1, const wxString& title = "wxToolBar Sample", - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE); + MyFrame(wxFrame *parent, + wxWindowID id = -1, + const wxString& title = "wxToolBar Sample", + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE); - void OnCloseWindow(wxCloseEvent& event); void OnQuit(wxCommandEvent& event); void OnAbout(wxCommandEvent& event); + + void OnToggleToolbar(wxCommandEvent& event); + void OnEnablePrint(wxCommandEvent& event) { DoEnablePrint(); } + void OnToggleHelp(wxCommandEvent& event) { DoToggleHelp(); } + void OnToolLeftClick(wxCommandEvent& event); void OnToolEnter(wxCommandEvent& event); private: - wxTextCtrl* m_textWindow; + void DoEnablePrint(); + void DoToggleHelp(); - MyTimer m_timer; + bool m_smallToolbar; + wxTextCtrl* m_textWindow; -DECLARE_EVENT_TABLE() + DECLARE_EVENT_TABLE() }; -#define ID_TOOLBAR 500 +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- +const int ID_TOOLBAR = 500; + +enum +{ + IDM_TOOLBAR_TOGGLETOOLBAR = 200, + IDM_TOOLBAR_ENABLEPRINT, + IDM_TOOLBAR_TOGGLEHELP +};