1998-09-12 13:33:59 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: typetest.h
|
2004-05-25 07:20:37 -04:00
|
|
|
// Purpose: Types wxWidgets sample
|
1998-09-12 13:33:59 -04:00
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 04/01/98
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Julian Smart
|
1999-08-07 19:10:09 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-09-12 13:33:59 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_TYPETEST_H_
|
|
|
|
#define _WX_TYPETEST_H_
|
|
|
|
|
|
|
|
// Define a new application type
|
|
|
|
class MyApp: public wxApp
|
|
|
|
{
|
|
|
|
public:
|
1999-08-07 19:10:09 -04:00
|
|
|
MyApp() { m_textCtrl = NULL; m_mimeDatabase = NULL; }
|
|
|
|
|
|
|
|
bool OnInit();
|
|
|
|
int OnExit() { delete m_mimeDatabase; return wxApp::OnExit(); }
|
1998-09-12 13:33:59 -04:00
|
|
|
|
|
|
|
void DoVariantDemo(wxCommandEvent& event);
|
1999-06-10 18:29:46 -04:00
|
|
|
void DoByteOrderDemo(wxCommandEvent& event);
|
1999-06-27 06:39:38 -04:00
|
|
|
void DoStreamDemo(wxCommandEvent& event);
|
1999-12-06 13:16:37 -05:00
|
|
|
void DoStreamDemo2(wxCommandEvent& event);
|
1999-12-08 03:28:29 -05:00
|
|
|
void DoStreamDemo3(wxCommandEvent& event);
|
1999-12-08 14:04:29 -05:00
|
|
|
void DoStreamDemo4(wxCommandEvent& event);
|
2000-07-15 15:51:35 -04:00
|
|
|
void DoStreamDemo5(wxCommandEvent& event);
|
2002-02-23 13:57:11 -05:00
|
|
|
void DoStreamDemo6(wxCommandEvent& event);
|
|
|
|
void DoStreamDemo7(wxCommandEvent& event);
|
1999-06-14 19:04:05 -04:00
|
|
|
#if wxUSE_UNICODE
|
|
|
|
void DoUnicodeDemo(wxCommandEvent& event);
|
2001-11-20 10:00:18 -05:00
|
|
|
#endif // wxUSE_UNICODE
|
1999-08-07 19:10:09 -04:00
|
|
|
void DoMIMEDemo(wxCommandEvent& event);
|
1998-09-12 13:33:59 -04:00
|
|
|
|
1999-08-07 19:10:09 -04:00
|
|
|
wxTextCtrl* GetTextCtrl() const { return m_textCtrl; }
|
1998-09-12 13:33:59 -04:00
|
|
|
|
|
|
|
private:
|
1999-08-07 19:10:09 -04:00
|
|
|
wxTextCtrl* m_textCtrl;
|
|
|
|
wxMimeTypesManager *m_mimeDatabase;
|
1998-09-12 13:33:59 -04:00
|
|
|
|
1999-08-07 19:10:09 -04:00
|
|
|
DECLARE_DYNAMIC_CLASS(MyApp)
|
|
|
|
DECLARE_EVENT_TABLE()
|
1998-09-12 13:33:59 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
DECLARE_APP(MyApp)
|
|
|
|
|
|
|
|
// Define a new frame type
|
|
|
|
class MyFrame: public wxFrame
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
MyFrame(wxFrame *parent, const wxString& title,
|
|
|
|
const wxPoint& pos, const wxSize& size);
|
1999-08-07 19:10:09 -04:00
|
|
|
|
1998-09-12 13:33:59 -04:00
|
|
|
public:
|
|
|
|
void OnQuit(wxCommandEvent& event);
|
|
|
|
void OnAbout(wxCommandEvent& event);
|
|
|
|
|
1999-08-07 19:10:09 -04:00
|
|
|
DECLARE_EVENT_TABLE()
|
1998-09-12 13:33:59 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
// ID for the menu commands
|
1999-08-07 19:10:09 -04:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
TYPES_QUIT = wxID_EXIT,
|
|
|
|
TYPES_TEXT = 101,
|
2005-06-02 08:04:48 -04:00
|
|
|
TYPES_ABOUT = wxID_ABOUT,
|
1999-08-07 19:10:09 -04:00
|
|
|
|
2005-06-02 08:04:48 -04:00
|
|
|
TYPES_DATE = 102,
|
1999-08-07 19:10:09 -04:00
|
|
|
TYPES_TIME,
|
|
|
|
TYPES_VARIANT,
|
|
|
|
TYPES_BYTEORDER,
|
|
|
|
TYPES_UNICODE,
|
|
|
|
TYPES_STREAM,
|
1999-12-06 13:16:37 -05:00
|
|
|
TYPES_STREAM2,
|
1999-12-08 03:28:29 -05:00
|
|
|
TYPES_STREAM3,
|
1999-12-08 14:04:29 -05:00
|
|
|
TYPES_STREAM4,
|
2000-07-15 15:51:35 -04:00
|
|
|
TYPES_STREAM5,
|
2002-02-23 13:57:11 -05:00
|
|
|
TYPES_STREAM6,
|
|
|
|
TYPES_STREAM7,
|
1999-08-07 19:10:09 -04:00
|
|
|
TYPES_MIME
|
|
|
|
};
|
1998-09-12 13:33:59 -04:00
|
|
|
|
|
|
|
#endif
|
|
|
|
// _WX_TYPETEST_H_
|
|
|
|
|