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