]>
Commit | Line | Data |
---|---|---|
14d1ccd8 JS |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: test.h | |
3 | // Purpose: wxToolBar sample | |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 23/07/98 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Julian Smart | |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | // Define a new application | |
13 | class MyApp: public wxApp | |
14 | { | |
15 | public: | |
16 | bool OnInit(void); | |
13437238 | 17 | bool InitToolbar(wxToolBar* toolBar); |
14d1ccd8 JS |
18 | }; |
19 | ||
8bbe427f VZ |
20 | class MyTimer : public wxTimer |
21 | { | |
22 | public: | |
23 | MyTimer(wxFrame *frame) { m_frame = frame; } | |
24 | ||
25 | virtual void Notify() { wxLogStatus(m_frame, "Timer arrived!"); } | |
26 | ||
27 | private: | |
28 | wxFrame *m_frame; | |
29 | }; | |
30 | ||
14d1ccd8 JS |
31 | // Define a new frame |
32 | class MyFrame: public wxFrame | |
33 | { | |
34 | public: | |
35 | MyFrame(wxFrame *parent, wxWindowID id = -1, const wxString& title = "wxToolBar Sample", | |
36 | const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, | |
37 | long style = wxDEFAULT_FRAME_STYLE); | |
38 | ||
39 | void OnCloseWindow(wxCloseEvent& event); | |
14d1ccd8 JS |
40 | void OnQuit(wxCommandEvent& event); |
41 | void OnAbout(wxCommandEvent& event); | |
13437238 JS |
42 | void OnToolLeftClick(wxCommandEvent& event); |
43 | void OnToolEnter(wxCommandEvent& event); | |
14d1ccd8 JS |
44 | |
45 | private: | |
46 | wxTextCtrl* m_textWindow; | |
47 | ||
8bbe427f VZ |
48 | MyTimer m_timer; |
49 | ||
14d1ccd8 JS |
50 | DECLARE_EVENT_TABLE() |
51 | }; | |
52 | ||
81d66cf3 JS |
53 | #define ID_TOOLBAR 500 |
54 |