]> git.saurik.com Git - wxWidgets.git/blame_incremental - samples/typetest/typetest.h
1. more corrections for ref counted editors/renderers (doesn't crash any more,
[wxWidgets.git] / samples / typetest / typetest.h
... / ...
CommitLineData
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
20class MyApp: public wxApp
21{
22public:
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 void DoStreamDemo2(wxCommandEvent& event);
34 void DoStreamDemo3(wxCommandEvent& event);
35 void DoStreamDemo4(wxCommandEvent& event);
36#if wxUSE_UNICODE
37 void DoUnicodeDemo(wxCommandEvent& event);
38#endif
39 void DoMIMEDemo(wxCommandEvent& event);
40
41 wxTextCtrl* GetTextCtrl() const { return m_textCtrl; }
42
43private:
44 wxTextCtrl* m_textCtrl;
45 wxMimeTypesManager *m_mimeDatabase;
46
47 DECLARE_DYNAMIC_CLASS(MyApp)
48 DECLARE_EVENT_TABLE()
49};
50
51DECLARE_APP(MyApp)
52
53// Define a new frame type
54class MyFrame: public wxFrame
55{
56public:
57 MyFrame(wxFrame *parent, const wxString& title,
58 const wxPoint& pos, const wxSize& size);
59
60public:
61 void OnQuit(wxCommandEvent& event);
62 void OnAbout(wxCommandEvent& event);
63
64 DECLARE_EVENT_TABLE()
65};
66
67// ID for the menu commands
68enum
69{
70 TYPES_QUIT = wxID_EXIT,
71 TYPES_TEXT = 101,
72 TYPES_ABOUT,
73
74 TYPES_DATE,
75 TYPES_TIME,
76 TYPES_VARIANT,
77 TYPES_BYTEORDER,
78 TYPES_UNICODE,
79 TYPES_STREAM,
80 TYPES_STREAM2,
81 TYPES_STREAM3,
82 TYPES_STREAM4,
83 TYPES_MIME
84};
85
86#endif
87 // _WX_TYPETEST_H_
88