added #if wxUSE_TIMEDATE where needed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12519 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -58,13 +58,15 @@ IMPLEMENT_APP (MyApp)
|
|||||||
IMPLEMENT_DYNAMIC_CLASS (MyApp, wxApp)
|
IMPLEMENT_DYNAMIC_CLASS (MyApp, wxApp)
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyApp, wxApp)
|
BEGIN_EVENT_TABLE(MyApp, wxApp)
|
||||||
|
#if wxUSE_TIMEDATE
|
||||||
EVT_MENU(TYPES_DATE, MyApp::DoDateDemo)
|
EVT_MENU(TYPES_DATE, MyApp::DoDateDemo)
|
||||||
|
#endif // wxUSE_TIMEDATE
|
||||||
EVT_MENU(TYPES_TIME, MyApp::DoTimeDemo)
|
EVT_MENU(TYPES_TIME, MyApp::DoTimeDemo)
|
||||||
EVT_MENU(TYPES_VARIANT, MyApp::DoVariantDemo)
|
EVT_MENU(TYPES_VARIANT, MyApp::DoVariantDemo)
|
||||||
EVT_MENU(TYPES_BYTEORDER, MyApp::DoByteOrderDemo)
|
EVT_MENU(TYPES_BYTEORDER, MyApp::DoByteOrderDemo)
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
EVT_MENU(TYPES_UNICODE, MyApp::DoUnicodeDemo)
|
EVT_MENU(TYPES_UNICODE, MyApp::DoUnicodeDemo)
|
||||||
#endif
|
#endif // wxUSE_UNICODE
|
||||||
EVT_MENU(TYPES_STREAM, MyApp::DoStreamDemo)
|
EVT_MENU(TYPES_STREAM, MyApp::DoStreamDemo)
|
||||||
EVT_MENU(TYPES_STREAM2, MyApp::DoStreamDemo2)
|
EVT_MENU(TYPES_STREAM2, MyApp::DoStreamDemo2)
|
||||||
EVT_MENU(TYPES_STREAM3, MyApp::DoStreamDemo3)
|
EVT_MENU(TYPES_STREAM3, MyApp::DoStreamDemo3)
|
||||||
@@ -90,13 +92,15 @@ bool MyApp::OnInit()
|
|||||||
file_menu->Append(TYPES_QUIT, "E&xit\tAlt-X");
|
file_menu->Append(TYPES_QUIT, "E&xit\tAlt-X");
|
||||||
|
|
||||||
wxMenu *test_menu = new wxMenu;
|
wxMenu *test_menu = new wxMenu;
|
||||||
|
#if wxUSE_TIMEDATE
|
||||||
test_menu->Append(TYPES_DATE, "&Date test");
|
test_menu->Append(TYPES_DATE, "&Date test");
|
||||||
|
#endif // wxUSE_TIMEDATE
|
||||||
test_menu->Append(TYPES_TIME, "&Time test");
|
test_menu->Append(TYPES_TIME, "&Time test");
|
||||||
test_menu->Append(TYPES_VARIANT, "&Variant test");
|
test_menu->Append(TYPES_VARIANT, "&Variant test");
|
||||||
test_menu->Append(TYPES_BYTEORDER, "&Byteorder test");
|
test_menu->Append(TYPES_BYTEORDER, "&Byteorder test");
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
test_menu->Append(TYPES_UNICODE, "&Unicode test");
|
test_menu->Append(TYPES_UNICODE, "&Unicode test");
|
||||||
#endif
|
#endif // wxUSE_UNICODE
|
||||||
test_menu->Append(TYPES_STREAM, "&Stream test");
|
test_menu->Append(TYPES_STREAM, "&Stream test");
|
||||||
test_menu->Append(TYPES_STREAM2, "&Stream seek test");
|
test_menu->Append(TYPES_STREAM2, "&Stream seek test");
|
||||||
test_menu->Append(TYPES_STREAM3, "&Stream error test");
|
test_menu->Append(TYPES_STREAM3, "&Stream error test");
|
||||||
@@ -857,6 +861,8 @@ void MyApp::DoTimeDemo(wxCommandEvent& WXUNUSED(event))
|
|||||||
textCtrl << "It is now " << (wxString) now << "\n";
|
textCtrl << "It is now " << (wxString) now << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if wxUSE_TIMEDATE
|
||||||
|
|
||||||
void MyApp::DoDateDemo(wxCommandEvent& WXUNUSED(event))
|
void MyApp::DoDateDemo(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
wxTextCtrl& textCtrl = * GetTextCtrl();
|
wxTextCtrl& textCtrl = * GetTextCtrl();
|
||||||
@@ -998,6 +1004,8 @@ void MyApp::DoDateDemo(wxCommandEvent& WXUNUSED(event))
|
|||||||
textCtrl << "The last date of this year is " << v4.GetYearEnd() << "\n";
|
textCtrl << "The last date of this year is " << v4.GetYearEnd() << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_TIMEDATE
|
||||||
|
|
||||||
void MyApp::DoVariantDemo(wxCommandEvent& WXUNUSED(event) )
|
void MyApp::DoVariantDemo(wxCommandEvent& WXUNUSED(event) )
|
||||||
{
|
{
|
||||||
wxTextCtrl& textCtrl = * GetTextCtrl();
|
wxTextCtrl& textCtrl = * GetTextCtrl();
|
||||||
|
@@ -25,7 +25,9 @@ public:
|
|||||||
bool OnInit();
|
bool OnInit();
|
||||||
int OnExit() { delete m_mimeDatabase; return wxApp::OnExit(); }
|
int OnExit() { delete m_mimeDatabase; return wxApp::OnExit(); }
|
||||||
|
|
||||||
|
#if wxUSE_TIMEDATE
|
||||||
void DoDateDemo(wxCommandEvent& event);
|
void DoDateDemo(wxCommandEvent& event);
|
||||||
|
#endif // wxUSE_TIMEDATE
|
||||||
void DoTimeDemo(wxCommandEvent& event);
|
void DoTimeDemo(wxCommandEvent& event);
|
||||||
void DoVariantDemo(wxCommandEvent& event);
|
void DoVariantDemo(wxCommandEvent& event);
|
||||||
void DoByteOrderDemo(wxCommandEvent& event);
|
void DoByteOrderDemo(wxCommandEvent& event);
|
||||||
@@ -36,7 +38,7 @@ public:
|
|||||||
void DoStreamDemo5(wxCommandEvent& event);
|
void DoStreamDemo5(wxCommandEvent& event);
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
void DoUnicodeDemo(wxCommandEvent& event);
|
void DoUnicodeDemo(wxCommandEvent& event);
|
||||||
#endif
|
#endif // wxUSE_UNICODE
|
||||||
void DoMIMEDemo(wxCommandEvent& event);
|
void DoMIMEDemo(wxCommandEvent& event);
|
||||||
|
|
||||||
wxTextCtrl* GetTextCtrl() const { return m_textCtrl; }
|
wxTextCtrl* GetTextCtrl() const { return m_textCtrl; }
|
||||||
|
Reference in New Issue
Block a user