]>
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 | |
8bbe427f VZ |
14 | { |
15 | public: | |
7fb23305 | 16 | bool OnInit(); |
d676ebcf | 17 | bool InitToolbar(wxToolBar* toolBar, bool smallicons = FALSE); |
8bbe427f VZ |
18 | }; |
19 | ||
14d1ccd8 JS |
20 | // Define a new frame |
21 | class MyFrame: public wxFrame | |
22 | { | |
23 | public: | |
7fb23305 VZ |
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); | |
14d1ccd8 | 30 | |
14d1ccd8 JS |
31 | void OnQuit(wxCommandEvent& event); |
32 | void OnAbout(wxCommandEvent& event); | |
7fb23305 VZ |
33 | |
34 | void OnToggleToolbar(wxCommandEvent& event); | |
35 | void OnEnablePrint(wxCommandEvent& event) { DoEnablePrint(); } | |
36 | void OnToggleHelp(wxCommandEvent& event) { DoToggleHelp(); } | |
37 | ||
13437238 JS |
38 | void OnToolLeftClick(wxCommandEvent& event); |
39 | void OnToolEnter(wxCommandEvent& event); | |
14d1ccd8 JS |
40 | |
41 | private: | |
7fb23305 VZ |
42 | void DoEnablePrint(); |
43 | void DoToggleHelp(); | |
44 | ||
45 | bool m_smallToolbar; | |
14d1ccd8 JS |
46 | wxTextCtrl* m_textWindow; |
47 | ||
1d5b7a0b | 48 | DECLARE_EVENT_TABLE() |
14d1ccd8 JS |
49 | }; |
50 | ||
7fb23305 VZ |
51 | // ---------------------------------------------------------------------------- |
52 | // constants | |
53 | // ---------------------------------------------------------------------------- | |
81d66cf3 | 54 | |
7fb23305 VZ |
55 | const int ID_TOOLBAR = 500; |
56 | ||
57 | enum | |
58 | { | |
59 | IDM_TOOLBAR_TOGGLETOOLBAR = 200, | |
60 | IDM_TOOLBAR_ENABLEPRINT, | |
61 | IDM_TOOLBAR_TOGGLEHELP | |
62 | }; |