]> git.saurik.com Git - wxWidgets.git/blob - samples/toolbar/test.h
Added wizard sample.
[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();
17 bool InitToolbar(wxToolBar* toolBar, bool smallicons = FALSE);
18 };
19
20 // Define a new frame
21 class MyFrame: public wxFrame
22 {
23 public:
24 MyFrame(wxFrame *parent,
25 wxWindowID id = -1,
26 const wxString& title = "wxToolBar Sample",
27 const wxPoint& pos = wxDefaultPosition,
28 const wxSize& size = wxDefaultSize,
29 long style = wxDEFAULT_FRAME_STYLE);
30
31 void OnQuit(wxCommandEvent& event);
32 void OnAbout(wxCommandEvent& event);
33
34 void OnToggleToolbar(wxCommandEvent& event);
35 void OnEnablePrint(wxCommandEvent& event) { DoEnablePrint(); }
36 void OnToggleHelp(wxCommandEvent& event) { DoToggleHelp(); }
37
38 void OnToolLeftClick(wxCommandEvent& event);
39 void OnToolEnter(wxCommandEvent& event);
40
41 private:
42 void DoEnablePrint();
43 void DoToggleHelp();
44
45 bool m_smallToolbar;
46 wxTextCtrl* m_textWindow;
47
48 DECLARE_EVENT_TABLE()
49 };
50
51 // ----------------------------------------------------------------------------
52 // constants
53 // ----------------------------------------------------------------------------
54
55 const int ID_TOOLBAR = 500;
56
57 enum
58 {
59 IDM_TOOLBAR_TOGGLETOOLBAR = 200,
60 IDM_TOOLBAR_ENABLEPRINT,
61 IDM_TOOLBAR_TOGGLEHELP
62 };