]> git.saurik.com Git - wxWidgets.git/blob - samples/typetest/typetest.h
fix wxSystemSettings::GetColour() for wxGTK3
[wxWidgets.git] / samples / typetest / typetest.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: typetest.h
3 // Purpose: Types wxWidgets sample
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 04/01/98
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
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:
18 MyApp() { m_textCtrl = NULL; m_mimeDatabase = NULL; }
19
20 bool OnInit();
21 int OnExit() { delete m_mimeDatabase; return wxApp::OnExit(); }
22
23 void DoVariantDemo(wxCommandEvent& event);
24 void DoByteOrderDemo(wxCommandEvent& event);
25 void DoStreamDemo(wxCommandEvent& event);
26 void DoStreamDemo2(wxCommandEvent& event);
27 void DoStreamDemo3(wxCommandEvent& event);
28 void DoStreamDemo4(wxCommandEvent& event);
29 void DoStreamDemo5(wxCommandEvent& event);
30 void DoStreamDemo6(wxCommandEvent& event);
31 void DoStreamDemo7(wxCommandEvent& event);
32 #if wxUSE_UNICODE
33 void DoUnicodeDemo(wxCommandEvent& event);
34 #endif // wxUSE_UNICODE
35 void DoMIMEDemo(wxCommandEvent& event);
36
37 wxTextCtrl* GetTextCtrl() const { return m_textCtrl; }
38
39 private:
40 wxTextCtrl* m_textCtrl;
41 wxMimeTypesManager *m_mimeDatabase;
42
43 DECLARE_DYNAMIC_CLASS(MyApp)
44 DECLARE_EVENT_TABLE()
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);
55
56 public:
57 void OnQuit(wxCommandEvent& event);
58 void OnAbout(wxCommandEvent& event);
59
60 DECLARE_EVENT_TABLE()
61 };
62
63 // ID for the menu commands
64 enum
65 {
66 TYPES_QUIT = wxID_EXIT,
67 TYPES_TEXT = 101,
68 TYPES_ABOUT = wxID_ABOUT,
69
70 TYPES_DATE = 102,
71 TYPES_TIME,
72 TYPES_VARIANT,
73 TYPES_BYTEORDER,
74 TYPES_UNICODE,
75 TYPES_STREAM,
76 TYPES_STREAM2,
77 TYPES_STREAM3,
78 TYPES_STREAM4,
79 TYPES_STREAM5,
80 TYPES_STREAM6,
81 TYPES_STREAM7,
82 TYPES_MIME
83 };
84
85 #endif
86 // _WX_TYPETEST_H_
87