]>
Commit | Line | Data |
---|---|---|
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 | |
9 | // Licence: wxWindows licence | |
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: | |
23 | MyApp() { m_textCtrl = NULL; m_mimeDatabase = NULL; } | |
24 | ||
25 | bool OnInit(); | |
26 | int OnExit() { delete m_mimeDatabase; return wxApp::OnExit(); } | |
27 | ||
28 | #if wxUSE_TIMEDATE | |
29 | void DoDateDemo(wxCommandEvent& event); | |
30 | #endif // wxUSE_TIMEDATE | |
31 | void DoTimeDemo(wxCommandEvent& event); | |
32 | void DoVariantDemo(wxCommandEvent& event); | |
33 | void DoByteOrderDemo(wxCommandEvent& event); | |
34 | void DoStreamDemo(wxCommandEvent& event); | |
35 | void DoStreamDemo2(wxCommandEvent& event); | |
36 | void DoStreamDemo3(wxCommandEvent& event); | |
37 | void DoStreamDemo4(wxCommandEvent& event); | |
38 | void DoStreamDemo5(wxCommandEvent& event); | |
39 | #if wxUSE_UNICODE | |
40 | void DoUnicodeDemo(wxCommandEvent& event); | |
41 | #endif // wxUSE_UNICODE | |
42 | void DoMIMEDemo(wxCommandEvent& event); | |
43 | ||
44 | wxTextCtrl* GetTextCtrl() const { return m_textCtrl; } | |
45 | ||
46 | private: | |
47 | wxTextCtrl* m_textCtrl; | |
48 | wxMimeTypesManager *m_mimeDatabase; | |
49 | ||
50 | DECLARE_DYNAMIC_CLASS(MyApp) | |
51 | DECLARE_EVENT_TABLE() | |
52 | }; | |
53 | ||
54 | DECLARE_APP(MyApp) | |
55 | ||
56 | // Define a new frame type | |
57 | class MyFrame: public wxFrame | |
58 | { | |
59 | public: | |
60 | MyFrame(wxFrame *parent, const wxString& title, | |
61 | const wxPoint& pos, const wxSize& size); | |
62 | ||
63 | public: | |
64 | void OnQuit(wxCommandEvent& event); | |
65 | void OnAbout(wxCommandEvent& event); | |
66 | ||
67 | DECLARE_EVENT_TABLE() | |
68 | }; | |
69 | ||
70 | // ID for the menu commands | |
71 | enum | |
72 | { | |
73 | TYPES_QUIT = wxID_EXIT, | |
74 | TYPES_TEXT = 101, | |
75 | TYPES_ABOUT, | |
76 | ||
77 | TYPES_DATE, | |
78 | TYPES_TIME, | |
79 | TYPES_VARIANT, | |
80 | TYPES_BYTEORDER, | |
81 | TYPES_UNICODE, | |
82 | TYPES_STREAM, | |
83 | TYPES_STREAM2, | |
84 | TYPES_STREAM3, | |
85 | TYPES_STREAM4, | |
86 | TYPES_STREAM5, | |
87 | TYPES_MIME | |
88 | }; | |
89 | ||
90 | #endif | |
91 | // _WX_TYPETEST_H_ | |
92 |