]> git.saurik.com Git - wxWidgets.git/blob - samples/typetest/typetest.h
forgot this one
[wxWidgets.git] / samples / typetest / typetest.h
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 void DoDateDemo(wxCommandEvent& event);
29 void DoTimeDemo(wxCommandEvent& event);
30 void DoVariantDemo(wxCommandEvent& event);
31 void DoByteOrderDemo(wxCommandEvent& event);
32 void DoStreamDemo(wxCommandEvent& event);
33 #if wxUSE_UNICODE
34 void DoUnicodeDemo(wxCommandEvent& event);
35 #endif
36 void DoMIMEDemo(wxCommandEvent& event);
37
38 wxTextCtrl* GetTextCtrl() const { return m_textCtrl; }
39
40 private:
41 wxTextCtrl* m_textCtrl;
42 wxMimeTypesManager *m_mimeDatabase;
43
44 DECLARE_DYNAMIC_CLASS(MyApp)
45 DECLARE_EVENT_TABLE()
46 };
47
48 DECLARE_APP(MyApp)
49
50 // Define a new frame type
51 class MyFrame: public wxFrame
52 {
53 public:
54 MyFrame(wxFrame *parent, const wxString& title,
55 const wxPoint& pos, const wxSize& size);
56
57 public:
58 void OnQuit(wxCommandEvent& event);
59 void OnAbout(wxCommandEvent& event);
60
61 DECLARE_EVENT_TABLE()
62 };
63
64 // ID for the menu commands
65 enum
66 {
67 TYPES_QUIT = wxID_EXIT,
68 TYPES_TEXT = 101,
69 TYPES_ABOUT,
70
71 TYPES_DATE,
72 TYPES_TIME,
73 TYPES_VARIANT,
74 TYPES_BYTEORDER,
75 TYPES_UNICODE,
76 TYPES_STREAM,
77 TYPES_MIME
78 };
79
80 #endif
81 // _WX_TYPETEST_H_
82