]> git.saurik.com Git - wxWidgets.git/blob - samples/toolbar/test.h
Added the forgotten file txtstrm.tex
[wxWidgets.git] / samples / toolbar / test.h
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);
17 bool InitToolbar(wxToolBar* toolBar);
18 };
19
20 class MyTimer : public wxTimer
21 {
22 public:
23 MyTimer(wxFrame *frame) { m_frame = frame; }
24
25 virtual void Notify() { wxLogStatus(m_frame, _T("Timer arrived!") ); }
26
27 private:
28 wxFrame *m_frame;
29 };
30
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);
40 void OnQuit(wxCommandEvent& event);
41 void OnAbout(wxCommandEvent& event);
42 void OnToolLeftClick(wxCommandEvent& event);
43 void OnToolEnter(wxCommandEvent& event);
44
45 private:
46 wxTextCtrl* m_textWindow;
47
48 DECLARE_EVENT_TABLE()
49 };
50
51 #define ID_TOOLBAR 500
52