]> git.saurik.com Git - wxWidgets.git/blob - samples/typetest/typetest.h
compilation fix for systems with XtIMSignal
[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 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #if defined(__GNUG__) && !defined(__APPLE__)
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 void DoVariantDemo(wxCommandEvent& event);
29 void DoByteOrderDemo(wxCommandEvent& event);
30 void DoStreamDemo(wxCommandEvent& event);
31 void DoStreamDemo2(wxCommandEvent& event);
32 void DoStreamDemo3(wxCommandEvent& event);
33 void DoStreamDemo4(wxCommandEvent& event);
34 void DoStreamDemo5(wxCommandEvent& event);
35 void DoStreamDemo6(wxCommandEvent& event);
36 void DoStreamDemo7(wxCommandEvent& event);
37 #if wxUSE_UNICODE
38 void DoUnicodeDemo(wxCommandEvent& event);
39 #endif // wxUSE_UNICODE
40 void DoMIMEDemo(wxCommandEvent& event);
41
42 wxTextCtrl* GetTextCtrl() const { return m_textCtrl; }
43
44 private:
45 wxTextCtrl* m_textCtrl;
46 wxMimeTypesManager *m_mimeDatabase;
47
48 DECLARE_DYNAMIC_CLASS(MyApp)
49 DECLARE_EVENT_TABLE()
50 };
51
52 DECLARE_APP(MyApp)
53
54 // Define a new frame type
55 class MyFrame: public wxFrame
56 {
57 public:
58 MyFrame(wxFrame *parent, const wxString& title,
59 const wxPoint& pos, const wxSize& size);
60
61 public:
62 void OnQuit(wxCommandEvent& event);
63 void OnAbout(wxCommandEvent& event);
64
65 DECLARE_EVENT_TABLE()
66 };
67
68 // ID for the menu commands
69 enum
70 {
71 TYPES_QUIT = wxID_EXIT,
72 TYPES_TEXT = 101,
73 TYPES_ABOUT = wxID_ABOUT,
74
75 TYPES_DATE = 102,
76 TYPES_TIME,
77 TYPES_VARIANT,
78 TYPES_BYTEORDER,
79 TYPES_UNICODE,
80 TYPES_STREAM,
81 TYPES_STREAM2,
82 TYPES_STREAM3,
83 TYPES_STREAM4,
84 TYPES_STREAM5,
85 TYPES_STREAM6,
86 TYPES_STREAM7,
87 TYPES_MIME
88 };
89
90 #endif
91 // _WX_TYPETEST_H_
92