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