]>
Commit | Line | Data |
---|---|---|
cfb88c55 JS |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: typetest.h | |
be5a51fb | 3 | // Purpose: Types wxWidgets sample |
cfb88c55 JS |
4 | // Author: Julian Smart |
5 | // Modified by: | |
6 | // Created: 04/01/98 | |
cfb88c55 | 7 | // Copyright: (c) Julian Smart |
8e124873 | 8 | // Licence: wxWindows licence |
cfb88c55 JS |
9 | ///////////////////////////////////////////////////////////////////////////// |
10 | ||
cfb88c55 JS |
11 | #ifndef _WX_TYPETEST_H_ |
12 | #define _WX_TYPETEST_H_ | |
13 | ||
14 | // Define a new application type | |
15 | class MyApp: public wxApp | |
16 | { | |
17 | public: | |
8e124873 VZ |
18 | MyApp() { m_textCtrl = NULL; m_mimeDatabase = NULL; } |
19 | ||
20 | bool OnInit(); | |
21 | int OnExit() { delete m_mimeDatabase; return wxApp::OnExit(); } | |
cfb88c55 | 22 | |
cfb88c55 | 23 | void DoVariantDemo(wxCommandEvent& event); |
7e2c43b8 | 24 | void DoByteOrderDemo(wxCommandEvent& event); |
38830220 | 25 | void DoStreamDemo(wxCommandEvent& event); |
1b055864 | 26 | void DoStreamDemo2(wxCommandEvent& event); |
aa51b2e1 | 27 | void DoStreamDemo3(wxCommandEvent& event); |
2bf8e4eb | 28 | void DoStreamDemo4(wxCommandEvent& event); |
f6bcfd97 | 29 | void DoStreamDemo5(wxCommandEvent& event); |
cbc906ce RR |
30 | void DoStreamDemo6(wxCommandEvent& event); |
31 | void DoStreamDemo7(wxCommandEvent& event); | |
dcf924a3 RR |
32 | #if wxUSE_UNICODE |
33 | void DoUnicodeDemo(wxCommandEvent& event); | |
3409ae17 | 34 | #endif // wxUSE_UNICODE |
8e124873 | 35 | void DoMIMEDemo(wxCommandEvent& event); |
cfb88c55 | 36 | |
8e124873 | 37 | wxTextCtrl* GetTextCtrl() const { return m_textCtrl; } |
cfb88c55 JS |
38 | |
39 | private: | |
8e124873 VZ |
40 | wxTextCtrl* m_textCtrl; |
41 | wxMimeTypesManager *m_mimeDatabase; | |
cfb88c55 | 42 | |
8e124873 VZ |
43 | DECLARE_DYNAMIC_CLASS(MyApp) |
44 | DECLARE_EVENT_TABLE() | |
cfb88c55 JS |
45 | }; |
46 | ||
47 | DECLARE_APP(MyApp) | |
48 | ||
49 | // Define a new frame type | |
50 | class MyFrame: public wxFrame | |
51 | { | |
52 | public: | |
53 | MyFrame(wxFrame *parent, const wxString& title, | |
54 | const wxPoint& pos, const wxSize& size); | |
8e124873 | 55 | |
cfb88c55 JS |
56 | public: |
57 | void OnQuit(wxCommandEvent& event); | |
58 | void OnAbout(wxCommandEvent& event); | |
cfb88c55 | 59 | |
8e124873 | 60 | DECLARE_EVENT_TABLE() |
cfb88c55 JS |
61 | }; |
62 | ||
63 | // ID for the menu commands | |
8e124873 VZ |
64 | enum |
65 | { | |
66 | TYPES_QUIT = wxID_EXIT, | |
67 | TYPES_TEXT = 101, | |
91b07357 | 68 | TYPES_ABOUT = wxID_ABOUT, |
8e124873 | 69 | |
91b07357 | 70 | TYPES_DATE = 102, |
8e124873 VZ |
71 | TYPES_TIME, |
72 | TYPES_VARIANT, | |
73 | TYPES_BYTEORDER, | |
74 | TYPES_UNICODE, | |
75 | TYPES_STREAM, | |
1b055864 | 76 | TYPES_STREAM2, |
aa51b2e1 | 77 | TYPES_STREAM3, |
2bf8e4eb | 78 | TYPES_STREAM4, |
f6bcfd97 | 79 | TYPES_STREAM5, |
cbc906ce RR |
80 | TYPES_STREAM6, |
81 | TYPES_STREAM7, | |
8e124873 VZ |
82 | TYPES_MIME |
83 | }; | |
cfb88c55 JS |
84 | |
85 | #endif | |
86 | // _WX_TYPETEST_H_ | |
87 |