X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e306597309a120f2ae91385c731a5cb2722c52aa..4e15d1caa03346c126015019c1fdf093033ef40b:/samples/typetest/typetest.h diff --git a/samples/typetest/typetest.h b/samples/typetest/typetest.h index aa78a80bd5..504ad26697 100644 --- a/samples/typetest/typetest.h +++ b/samples/typetest/typetest.h @@ -1,18 +1,14 @@ ///////////////////////////////////////////////////////////////////////////// // Name: typetest.h -// Purpose: Types wxWindows sample +// Purpose: Types wxWidgets sample // Author: Julian Smart // Modified by: // Created: 04/01/98 // RCS-ID: $Id$ // Copyright: (c) Julian Smart -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma interface "typetest.h" -#endif - #ifndef _WX_TYPETEST_H_ #define _WX_TYPETEST_H_ @@ -20,19 +16,33 @@ class MyApp: public wxApp { public: - bool OnInit(void); + MyApp() { m_textCtrl = NULL; m_mimeDatabase = NULL; } + + bool OnInit(); + int OnExit() { delete m_mimeDatabase; return wxApp::OnExit(); } - void DoDateDemo(wxCommandEvent& event); - void DoTimeDemo(wxCommandEvent& event); void DoVariantDemo(wxCommandEvent& event); + void DoByteOrderDemo(wxCommandEvent& event); + void DoStreamDemo(wxCommandEvent& event); + void DoStreamDemo2(wxCommandEvent& event); + void DoStreamDemo3(wxCommandEvent& event); + void DoStreamDemo4(wxCommandEvent& event); + void DoStreamDemo5(wxCommandEvent& event); + void DoStreamDemo6(wxCommandEvent& event); + void DoStreamDemo7(wxCommandEvent& event); +#if wxUSE_UNICODE + void DoUnicodeDemo(wxCommandEvent& event); +#endif // wxUSE_UNICODE + void DoMIMEDemo(wxCommandEvent& event); - wxTextCtrl* GetTextCtrl() const { return m_textCtrl; } + wxTextCtrl* GetTextCtrl() const { return m_textCtrl; } private: - wxTextCtrl* m_textCtrl; + wxTextCtrl* m_textCtrl; + wxMimeTypesManager *m_mimeDatabase; -DECLARE_DYNAMIC_CLASS(MyApp) -DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(MyApp) + DECLARE_EVENT_TABLE() }; DECLARE_APP(MyApp) @@ -43,23 +53,35 @@ class MyFrame: public wxFrame public: MyFrame(wxFrame *parent, const wxString& title, const wxPoint& pos, const wxSize& size); - + public: void OnQuit(wxCommandEvent& event); void OnAbout(wxCommandEvent& event); - DECLARE_EVENT_TABLE() - + DECLARE_EVENT_TABLE() }; // ID for the menu commands -#define TYPES_QUIT wxID_EXIT -#define TYPES_TEXT 101 -#define TYPES_ABOUT 102 +enum +{ + TYPES_QUIT = wxID_EXIT, + TYPES_TEXT = 101, + TYPES_ABOUT = wxID_ABOUT, -#define TYPES_DATE 103 -#define TYPES_TIME 104 -#define TYPES_VARIANT 105 + TYPES_DATE = 102, + TYPES_TIME, + TYPES_VARIANT, + TYPES_BYTEORDER, + TYPES_UNICODE, + TYPES_STREAM, + TYPES_STREAM2, + TYPES_STREAM3, + TYPES_STREAM4, + TYPES_STREAM5, + TYPES_STREAM6, + TYPES_STREAM7, + TYPES_MIME +}; #endif // _WX_TYPETEST_H_