]> git.saurik.com Git - wxWidgets.git/blame - samples/typetest/typetest.h
Added start at accessibility sample
[wxWidgets.git] / samples / typetest / typetest.h
CommitLineData
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
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
3409ae17 28#if wxUSE_TIMEDATE
cfb88c55 29 void DoDateDemo(wxCommandEvent& event);
3409ae17 30#endif // wxUSE_TIMEDATE
cfb88c55
JS
31 void DoTimeDemo(wxCommandEvent& event);
32 void DoVariantDemo(wxCommandEvent& event);
7e2c43b8 33 void DoByteOrderDemo(wxCommandEvent& event);
38830220 34 void DoStreamDemo(wxCommandEvent& event);
1b055864 35 void DoStreamDemo2(wxCommandEvent& event);
aa51b2e1 36 void DoStreamDemo3(wxCommandEvent& event);
2bf8e4eb 37 void DoStreamDemo4(wxCommandEvent& event);
f6bcfd97 38 void DoStreamDemo5(wxCommandEvent& event);
cbc906ce
RR
39 void DoStreamDemo6(wxCommandEvent& event);
40 void DoStreamDemo7(wxCommandEvent& event);
dcf924a3
RR
41#if wxUSE_UNICODE
42 void DoUnicodeDemo(wxCommandEvent& event);
3409ae17 43#endif // wxUSE_UNICODE
8e124873 44 void DoMIMEDemo(wxCommandEvent& event);
cfb88c55 45
8e124873 46 wxTextCtrl* GetTextCtrl() const { return m_textCtrl; }
cfb88c55
JS
47
48private:
8e124873
VZ
49 wxTextCtrl* m_textCtrl;
50 wxMimeTypesManager *m_mimeDatabase;
cfb88c55 51
8e124873
VZ
52 DECLARE_DYNAMIC_CLASS(MyApp)
53 DECLARE_EVENT_TABLE()
cfb88c55
JS
54};
55
56DECLARE_APP(MyApp)
57
58// Define a new frame type
59class MyFrame: public wxFrame
60{
61public:
62 MyFrame(wxFrame *parent, const wxString& title,
63 const wxPoint& pos, const wxSize& size);
8e124873 64
cfb88c55
JS
65public:
66 void OnQuit(wxCommandEvent& event);
67 void OnAbout(wxCommandEvent& event);
cfb88c55 68
8e124873 69 DECLARE_EVENT_TABLE()
cfb88c55
JS
70};
71
72// ID for the menu commands
8e124873
VZ
73enum
74{
75 TYPES_QUIT = wxID_EXIT,
76 TYPES_TEXT = 101,
77 TYPES_ABOUT,
78
79 TYPES_DATE,
80 TYPES_TIME,
81 TYPES_VARIANT,
82 TYPES_BYTEORDER,
83 TYPES_UNICODE,
84 TYPES_STREAM,
1b055864 85 TYPES_STREAM2,
aa51b2e1 86 TYPES_STREAM3,
2bf8e4eb 87 TYPES_STREAM4,
f6bcfd97 88 TYPES_STREAM5,
cbc906ce
RR
89 TYPES_STREAM6,
90 TYPES_STREAM7,
8e124873
VZ
91 TYPES_MIME
92};
cfb88c55
JS
93
94#endif
95 // _WX_TYPETEST_H_
96