X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/14d1ccd89decb9d84f394fb2218eddbfdba56baf..a3c1786def55bcc233f9606acb1aceee956d184f:/samples/toolbar/test.h diff --git a/samples/toolbar/test.h b/samples/toolbar/test.h index 1c680a819d..81ad6c421b 100644 --- a/samples/toolbar/test.h +++ b/samples/toolbar/test.h @@ -14,6 +14,18 @@ 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, _T("Timer arrived!") ); } + +private: + wxFrame *m_frame; }; // Define a new frame @@ -25,29 +37,16 @@ public: long style = wxDEFAULT_FRAME_STYLE); void OnCloseWindow(wxCloseEvent& event); - void OnMenuHighlight(wxMenuEvent& event); void OnQuit(wxCommandEvent& event); void OnAbout(wxCommandEvent& event); + void OnToolLeftClick(wxCommandEvent& event); + void OnToolEnter(wxCommandEvent& event); private: wxTextCtrl* m_textWindow; -DECLARE_EVENT_TABLE() -}; - -class TestToolBar: public wxToolBar -{ - public: - TestToolBar(wxFrame *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - 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() + DECLARE_EVENT_TABLE() }; -#define TEST_QUIT 100 -#define TEST_ABOUT 101 +#define ID_TOOLBAR 500