]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/typetest/typetest.cpp
typo in style definition fixed
[wxWidgets.git] / samples / typetest / typetest.cpp
index b7be53b1a244cd1e3c8b0258bdb61c837a81d6b1..8f6ef265dcec558284e92e41bf2eeb942680ec32 100644 (file)
@@ -31,7 +31,7 @@
 
 #include "typetest.h"
 
-#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__)
+#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXMGL__)
 #include "mondrian.xpm"
 #endif
 
@@ -58,13 +58,15 @@ IMPLEMENT_APP    (MyApp)
 IMPLEMENT_DYNAMIC_CLASS    (MyApp, wxApp)
 
 BEGIN_EVENT_TABLE(MyApp, wxApp)
+#if wxUSE_TIMEDATE
     EVT_MENU(TYPES_DATE,      MyApp::DoDateDemo)
     EVT_MENU(TYPES_TIME,      MyApp::DoTimeDemo)
+#endif // wxUSE_TIMEDATE
     EVT_MENU(TYPES_VARIANT,   MyApp::DoVariantDemo)
     EVT_MENU(TYPES_BYTEORDER, MyApp::DoByteOrderDemo)
 #if wxUSE_UNICODE
     EVT_MENU(TYPES_UNICODE,   MyApp::DoUnicodeDemo)
-#endif
+#endif // wxUSE_UNICODE
     EVT_MENU(TYPES_STREAM, MyApp::DoStreamDemo)
     EVT_MENU(TYPES_STREAM2, MyApp::DoStreamDemo2)
     EVT_MENU(TYPES_STREAM3, MyApp::DoStreamDemo3)
@@ -90,13 +92,15 @@ bool MyApp::OnInit()
     file_menu->Append(TYPES_QUIT, "E&xit\tAlt-X");
 
     wxMenu *test_menu = new wxMenu;
+#if wxUSE_TIMEDATE
     test_menu->Append(TYPES_DATE, "&Date test");
+#endif // wxUSE_TIMEDATE
     test_menu->Append(TYPES_TIME, "&Time test");
     test_menu->Append(TYPES_VARIANT, "&Variant test");
     test_menu->Append(TYPES_BYTEORDER, "&Byteorder test");
 #if wxUSE_UNICODE
     test_menu->Append(TYPES_UNICODE, "&Unicode test");
-#endif
+#endif // wxUSE_UNICODE
     test_menu->Append(TYPES_STREAM, "&Stream test");
     test_menu->Append(TYPES_STREAM2, "&Stream seek test");
     test_menu->Append(TYPES_STREAM3, "&Stream error test");
@@ -230,7 +234,7 @@ void MyApp::DoStreamDemo(wxCommandEvent& WXUNUSED(event))
     file_output.SeekO( 0 );
     wxDataOutputStream data_output( buf_output );
 
-    wxInt16 i16 = (short)0xFFFF;
+    wxInt16 i16 = (unsigned short)0xFFFF;
     tmp.Printf( _T("Signed int16: %d\n"), (int)i16 );
     textCtrl.WriteText( tmp );
     data_output.Write16( i16 );
@@ -847,6 +851,8 @@ void MyApp::DoByteOrderDemo(wxCommandEvent& WXUNUSED(event))
     textCtrl.WriteText( text );
 }
 
+#if wxUSE_TIMEDATE
+
 void MyApp::DoTimeDemo(wxCommandEvent& WXUNUSED(event))
 {
     wxTextCtrl& textCtrl = * GetTextCtrl();
@@ -998,6 +1004,8 @@ void MyApp::DoDateDemo(wxCommandEvent& WXUNUSED(event))
     textCtrl << "The last date of this year is " << v4.GetYearEnd() << "\n";
 }
 
+#endif // wxUSE_TIMEDATE
+
 void MyApp::DoVariantDemo(wxCommandEvent& WXUNUSED(event) )
 {
     wxTextCtrl& textCtrl = * GetTextCtrl();