]>
Commit | Line | Data |
---|---|---|
457814b5 JS |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: resource.h | |
3 | // Purpose: Dialog resource sample | |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 04/01/98 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Julian Smart and Markus Holzem | |
9 | // Licence: wxWindows license | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifdef __GNUG__ | |
13 | // #pragma interface | |
14 | #endif | |
15 | ||
16 | // Define a new application | |
17 | class MyApp: public wxApp | |
18 | { | |
1d5b7a0b VZ |
19 | public: |
20 | MyApp(); | |
21 | ||
22 | virtual bool OnInit(); | |
23 | ||
24 | virtual ~MyApp(); | |
457814b5 JS |
25 | }; |
26 | ||
8d71b555 RR |
27 | class MyPanel: public wxPanel |
28 | { | |
1d5b7a0b VZ |
29 | public: |
30 | MyPanel(wxWindow *parent, wxWindowID id, const wxPoint& pos, | |
31 | const wxSize& size, int style, const wxString &name); | |
8d71b555 | 32 | void OnClick(wxMouseEvent &event); |
1d5b7a0b VZ |
33 | |
34 | private: | |
35 | DECLARE_EVENT_TABLE() | |
8d71b555 RR |
36 | }; |
37 | ||
457814b5 JS |
38 | class MyFrame: public wxFrame |
39 | { | |
1d5b7a0b VZ |
40 | public: |
41 | MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, | |
42 | const wxPoint& pos, const wxSize& size); | |
43 | bool OnClose(); | |
457814b5 | 44 | void OnQuit(wxCommandEvent& event); |
1d5b7a0b VZ |
45 | void OnAbout(wxCommandEvent& event); |
46 | void OnTestDialog(wxCommandEvent& event); | |
47 | ||
48 | wxWindow *panel; | |
457814b5 | 49 | |
1d5b7a0b VZ |
50 | private: |
51 | DECLARE_EVENT_TABLE() | |
457814b5 JS |
52 | }; |
53 | ||
54 | class MyDialog : public wxDialog | |
55 | { | |
1d5b7a0b | 56 | public: |
457814b5 JS |
57 | void OnOk(wxCommandEvent& event); |
58 | void OnCancel(wxCommandEvent& event); | |
1d5b7a0b VZ |
59 | |
60 | private: | |
61 | DECLARE_EVENT_TABLE() | |
457814b5 JS |
62 | }; |
63 | ||
1d5b7a0b VZ |
64 | // the values should be the same as in menu.wxr file! |
65 | enum | |
66 | { | |
67 | RESOURCE_TESTDIALOG = 2, | |
68 | RESOURCE_QUIT = 4, | |
69 | RESOURCE_ABOUT = 6 | |
70 | }; |