1998-09-12 13:33:59 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: typetest.h
|
|
|
|
// Purpose: Types wxWindows sample
|
|
|
|
// 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
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface "typetest.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#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 DoDateDemo(wxCommandEvent& event);
|
|
|
|
void DoTimeDemo(wxCommandEvent& event);
|
|
|
|
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-06-14 19:04:05 -04:00
|
|
|
#if wxUSE_UNICODE
|
|
|
|
void DoUnicodeDemo(wxCommandEvent& event);
|
|
|
|
#endif
|
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,
|
|
|
|
TYPES_ABOUT,
|
|
|
|
|
|
|
|
TYPES_DATE,
|
|
|
|
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-08-07 19:10:09 -04:00
|
|
|
TYPES_MIME
|
|
|
|
};
|
1998-09-12 13:33:59 -04:00
|
|
|
|
|
|
|
#endif
|
|
|
|
// _WX_TYPETEST_H_
|
|
|
|
|