]> git.saurik.com Git - wxWidgets.git/blob - samples/typetest/typetest.cpp
Fixed a deadlock problem when using threads
[wxWidgets.git] / samples / typetest / typetest.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: typetest.cpp
3 // Purpose: Types wxWindows sample
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 04/01/98
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart and Markus Holzem
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifdef __GNUG__
13 #pragma implementation "typetest.h"
14 #endif
15
16 // For compilers that support precompilation, includes "wx/wx.h".
17 #include "wx/wxprec.h"
18
19 #ifdef __BORLANDC__
20 #pragma hdrstop
21 #endif
22
23 #ifndef WX_PRECOMP
24 #include "wx/wx.h"
25 #endif
26
27 #include "wx/time.h"
28 #include "wx/date.h"
29 #include "wx/variant.h"
30 #include "wx/mimetype.h"
31
32 #include "typetest.h"
33
34 #if defined(__WXGTK__) || defined(__WXMOTIF__)
35 #include "mondrian.xpm"
36 #endif
37
38 #include "wx/ioswrap.h"
39
40 #if wxUSE_IOSTREAMH
41 #include <fstream.h>
42 #else
43 #include <fstream>
44 #endif
45
46 #include "wx/wfstream.h"
47 #include "wx/datstrm.h"
48 #include "wx/txtstrm.h"
49
50 // Create a new application object
51 IMPLEMENT_APP (MyApp)
52
53 IMPLEMENT_DYNAMIC_CLASS (MyApp, wxApp)
54
55 BEGIN_EVENT_TABLE(MyApp, wxApp)
56 EVT_MENU(TYPES_DATE, MyApp::DoDateDemo)
57 EVT_MENU(TYPES_TIME, MyApp::DoTimeDemo)
58 EVT_MENU(TYPES_VARIANT, MyApp::DoVariantDemo)
59 EVT_MENU(TYPES_BYTEORDER, MyApp::DoByteOrderDemo)
60 #if wxUSE_UNICODE
61 EVT_MENU(TYPES_UNICODE, MyApp::DoUnicodeDemo)
62 #endif
63 EVT_MENU(TYPES_STREAM, MyApp::DoStreamDemo)
64 EVT_MENU(TYPES_MIME, MyApp::DoMIMEDemo)
65 END_EVENT_TABLE()
66
67 bool MyApp::OnInit()
68 {
69 // Create the main frame window
70 MyFrame *frame = new MyFrame((wxFrame *) NULL, "wxWindows Types Demo",
71 wxPoint(50, 50), wxSize(450, 340));
72
73 // Give it an icon
74 frame->SetIcon(wxICON(mondrian));
75
76 // Make a menubar
77 wxMenu *file_menu = new wxMenu;
78
79 file_menu->Append(TYPES_ABOUT, "&About");
80 file_menu->AppendSeparator();
81 file_menu->Append(TYPES_QUIT, "E&xit\tAlt-X");
82
83 wxMenu *test_menu = new wxMenu;
84 test_menu->Append(TYPES_DATE, "&Date test");
85 test_menu->Append(TYPES_TIME, "&Time test");
86 test_menu->Append(TYPES_VARIANT, "&Variant test");
87 test_menu->Append(TYPES_BYTEORDER, "&Byteorder test");
88 #if wxUSE_UNICODE
89 test_menu->Append(TYPES_UNICODE, "&Unicode test");
90 #endif
91 test_menu->Append(TYPES_STREAM, "&Stream test");
92 test_menu->AppendSeparator();
93 test_menu->Append(TYPES_MIME, "&MIME database test");
94
95 wxMenuBar *menu_bar = new wxMenuBar;
96 menu_bar->Append(file_menu, "&File");
97 menu_bar->Append(test_menu, "&Tests");
98 frame->SetMenuBar(menu_bar);
99
100 m_textCtrl = new wxTextCtrl(frame, -1, "", wxPoint(0, 0), wxDefaultSize, wxTE_MULTILINE);
101
102 // Show the frame
103 frame->Show(TRUE);
104
105 SetTopWindow(frame);
106
107 return TRUE;
108 }
109
110 void MyApp::DoStreamDemo(wxCommandEvent& WXUNUSED(event))
111 {
112 wxTextCtrl& textCtrl = * GetTextCtrl();
113
114 textCtrl.Clear();
115 textCtrl << _T("\nTest fstream vs. wxFileStream:\n\n");
116
117 textCtrl.WriteText( "Writing to ofstream and wxFileOutputStream:\n" );
118
119 ofstream std_file_output( "test_std.dat" );
120 wxFileOutputStream file_output( "test_wx.dat" );
121 wxBufferedOutputStream buf_output( file_output );
122 wxTextOutputStream text_output( buf_output );
123
124 wxString tmp;
125 signed int si = 0xFFFFFFFF;
126 tmp.Printf( _T("Signed int: %d\n"), si );
127 textCtrl.WriteText( tmp );
128 text_output << si << "\n";
129 std_file_output << si << "\n";
130
131 unsigned int ui = 0xFFFFFFFF;
132 tmp.Printf( _T("Unsigned int: %u\n"), ui );
133 textCtrl.WriteText( tmp );
134 text_output << ui << "\n";
135 std_file_output << ui << "\n";
136
137 double d = 2.01234567890123456789;
138 tmp.Printf( _T("Double: %f\n"), d );
139 textCtrl.WriteText( tmp );
140 text_output << d << "\n";
141 std_file_output << d << "\n";
142
143 float f = (float)0.00001;
144 tmp.Printf( _T("Float: %f\n"), f );
145 textCtrl.WriteText( tmp );
146 text_output << f << "\n";
147 std_file_output << f << "\n";
148
149 wxString str( _T("Hello!") );
150 tmp.Printf( _T("String: %s\n"), str.c_str() );
151 textCtrl.WriteText( tmp );
152 text_output << str << "\n";
153 std_file_output << str.c_str() << "\n";
154
155 textCtrl.WriteText( "\nReading from ifstream:\n" );
156
157 ifstream std_file_input( "test_std.dat" );
158
159 std_file_input >> si;
160 tmp.Printf( _T("Signed int: %d\n"), si );
161 textCtrl.WriteText( tmp );
162
163 std_file_input >> ui;
164 tmp.Printf( _T("Unsigned int: %u\n"), ui );
165 textCtrl.WriteText( tmp );
166
167 std_file_input >> d;
168 tmp.Printf( _T("Double: %f\n"), d );
169 textCtrl.WriteText( tmp );
170
171 std_file_input >> f;
172 tmp.Printf( _T("Float: %f\n"), f );
173 textCtrl.WriteText( tmp );
174
175 std_file_input >> str;
176 tmp.Printf( _T("String: %s\n"), str.c_str() );
177 textCtrl.WriteText( tmp );
178
179 textCtrl.WriteText( "\nReading from wxFileInputStream:\n" );
180
181 buf_output.Sync();
182
183 wxFileInputStream file_input( "test_wx.dat" );
184 wxBufferedInputStream buf_input( file_input );
185 wxTextInputStream text_input( buf_input );
186
187 text_input >> si;
188 tmp.Printf( _T("Signed int: %d\n"), si );
189 textCtrl.WriteText( tmp );
190
191 text_input >> ui;
192 tmp.Printf( _T("Unsigned int: %u\n"), ui );
193 textCtrl.WriteText( tmp );
194
195 text_input >> d;
196 tmp.Printf( _T("Double: %f\n"), d );
197 textCtrl.WriteText( tmp );
198
199 text_input >> f;
200 tmp.Printf( _T("Float: %f\n"), f );
201 textCtrl.WriteText( tmp );
202
203 text_input >> str;
204 tmp.Printf( _T("String: %s\n"), str.c_str() );
205 textCtrl.WriteText( tmp );
206
207
208 textCtrl << "\nTest for wxDataStream:\n\n";
209
210 textCtrl.WriteText( "Writing to wxDataOutputStream:\n" );
211
212 file_output.SeekO( 0 );
213 wxDataOutputStream data_output( buf_output );
214
215 wxInt16 i16 = (short)0xFFFF;
216 tmp.Printf( _T("Signed int16: %d\n"), (int)i16 );
217 textCtrl.WriteText( tmp );
218 data_output.Write16( i16 );
219
220 wxUint16 ui16 = 0xFFFF;
221 tmp.Printf( _T("Unsigned int16: %u\n"), (unsigned int) ui16 );
222 textCtrl.WriteText( tmp );
223 data_output.Write16( ui16 );
224
225 d = 2.01234567890123456789;
226 tmp.Printf( _T("Double: %f\n"), d );
227 textCtrl.WriteText( tmp );
228 data_output.WriteDouble( d );
229
230 str = "Hello!";
231 tmp.Printf( _T("String: %s\n"), str.c_str() );
232 textCtrl.WriteText( tmp );
233 data_output.WriteString( str );
234
235 buf_output.Sync();
236
237 textCtrl.WriteText( "\nReading from wxDataInputStream:\n" );
238
239 file_input.SeekI( 0 );
240 wxDataInputStream data_input( buf_input );
241
242 i16 = data_input.Read16();
243 tmp.Printf( _T("Signed int16: %d\n"), (int)i16 );
244 textCtrl.WriteText( tmp );
245
246 ui16 = data_input.Read16();
247 tmp.Printf( _T("Unsigned int16: %u\n"), (unsigned int) ui16 );
248 textCtrl.WriteText( tmp );
249
250 d = data_input.ReadDouble();
251 tmp.Printf( _T("Double: %f\n"), d );
252 textCtrl.WriteText( tmp );
253
254 str = data_input.ReadString();
255 tmp.Printf( _T("String: %s\n"), str.c_str() );
256 textCtrl.WriteText( tmp );
257 }
258
259 #if wxUSE_UNICODE
260 void MyApp::DoUnicodeDemo(wxCommandEvent& WXUNUSED(event))
261 {
262 wxTextCtrl& textCtrl = * GetTextCtrl();
263
264 textCtrl.Clear();
265 textCtrl << "\nTest wchar_t to char (Unicode to ANSI/Multibyte) converions:";
266
267 wxString str;
268 str = _T("Robert Röbling\n");
269
270 printf( "\n\nConversion with wxConvLocal:\n" );
271 wxConvCurrent = &wxConvLocal;
272 printf( (const char*) str.mbc_str() );
273
274 printf( "\n\nConversion with wxConvGdk:\n" );
275 wxConvCurrent = &wxConvGdk;
276 printf( (const char*) str.mbc_str() );
277
278 printf( "\n\nConversion with wxConvLibc:\n" );
279 wxConvCurrent = &wxConvLibc;
280 printf( (const char*) str.mbc_str() );
281
282 }
283 #endif
284
285 void MyApp::DoMIMEDemo(wxCommandEvent& WXUNUSED(event))
286 {
287 static wxString s_defaultExt = "xyz";
288
289 wxString ext = wxGetTextFromUser("Enter a file extension: ",
290 "MIME database test",
291 s_defaultExt);
292 if ( !!ext )
293 {
294 s_defaultExt = ext;
295
296 // init MIME database if not done yet
297 if ( !m_mimeDatabase )
298 {
299 m_mimeDatabase = new wxMimeTypesManager;
300
301 static const wxFileTypeInfo fallbacks[] =
302 {
303 wxFileTypeInfo("application/xyz",
304 "XyZ %s",
305 "XyZ -p %s",
306 "The one and only XYZ format file",
307 "xyz", "123", NULL),
308 wxFileTypeInfo("text/html",
309 "lynx %s",
310 "lynx -dump %s | lpr",
311 "HTML document (from fallback)",
312 "htm", "html", NULL),
313
314 // must terminate the table with this!
315 wxFileTypeInfo()
316 };
317
318 m_mimeDatabase->AddFallbacks(fallbacks);
319 }
320
321 wxTextCtrl& textCtrl = * GetTextCtrl();
322
323 wxFileType *filetype = m_mimeDatabase->GetFileTypeFromExtension(ext);
324 if ( !filetype )
325 {
326 textCtrl << "Unknown extension '" << ext << "'\n";
327 }
328 else
329 {
330 wxString type, desc, open;
331 filetype->GetMimeType(&type);
332 filetype->GetDescription(&desc);
333
334 wxString filename = "filename";
335 filename << "." << ext;
336 wxFileType::MessageParameters params(filename, type);
337 filetype->GetOpenCommand(&open, params);
338
339 textCtrl << "MIME information about extension '" << ext << "'\n"
340 << "\tMIME type: " << ( !type ? "unknown"
341 : type.c_str() ) << '\n'
342 << "\tDescription: " << ( !desc ? "" : desc.c_str() )
343 << '\n'
344 << "\tCommand to open: " << ( !open ? "no" : open.c_str() )
345 << '\n';
346
347 delete filetype;
348 }
349 }
350 //else: cancelled by user
351 }
352
353 void MyApp::DoByteOrderDemo(wxCommandEvent& WXUNUSED(event))
354 {
355 wxTextCtrl& textCtrl = * GetTextCtrl();
356
357 textCtrl.Clear();
358 textCtrl << "\nTest byte order macros:\n\n";
359
360 if (wxBYTE_ORDER == wxLITTLE_ENDIAN)
361 textCtrl << "This is a little endian system.\n\n";
362 else
363 textCtrl << "This is a big endian system.\n\n";
364
365 wxString text;
366
367 wxInt32 var = 0xF1F2F3F4;
368 text = "";
369 text.Printf( _T("Value of wxInt32 is now: %#x.\n\n"), var );
370 textCtrl.WriteText( text );
371
372 text = "";
373 text.Printf( _T("Value of swapped wxInt32 is: %#x.\n\n"), wxINT32_SWAP_ALWAYS( var ) );
374 textCtrl.WriteText( text );
375
376 text = "";
377 text.Printf( _T("Value of wxInt32 swapped on little endian is: %#x.\n\n"), wxINT32_SWAP_ON_LE( var ) );
378 textCtrl.WriteText( text );
379
380 text = "";
381 text.Printf( _T("Value of wxInt32 swapped on big endian is: %#x.\n\n"), wxINT32_SWAP_ON_BE( var ) );
382 textCtrl.WriteText( text );
383 }
384
385 void MyApp::DoTimeDemo(wxCommandEvent& WXUNUSED(event))
386 {
387 wxTextCtrl& textCtrl = * GetTextCtrl();
388
389 textCtrl.Clear();
390 textCtrl << "\nTest class wxTime:\n";
391 wxTime now;
392 textCtrl << "It is now " << (wxString) now << "\n";
393 }
394
395 void MyApp::DoDateDemo(wxCommandEvent& WXUNUSED(event))
396 {
397 wxTextCtrl& textCtrl = * GetTextCtrl();
398
399 textCtrl.Clear();
400 textCtrl << "\nTest class wxDate" << "\n";
401
402 // Various versions of the constructors
403 // and various output
404
405 wxDate x(10,20,1962);
406
407 textCtrl << x.FormatDate(wxFULL) << " (full)\n";
408
409 // constuctor with a string, just printing the day of the week
410 wxDate y("8/8/1988");
411
412 textCtrl << y.FormatDate(wxDAY) << " (just day)\n";
413
414 // constructor with a julian
415 wxDate z( 2450000L );
416 textCtrl << z.FormatDate(wxFULL) << " (full)\n";
417
418 // using date addition and subtraction
419 wxDate a = x + 10;
420 textCtrl << a.FormatDate(wxFULL) << " (full)\n";
421 a = a - 25;
422 textCtrl << a.FormatDate(wxEUROPEAN) << " (European)\n";
423
424 // Using subtraction of two date objects
425 wxDate a1 = wxString("7/13/1991");
426 wxDate a2 = a1 + 14;
427 textCtrl << (a1-a2) << "\n";
428 textCtrl << (a2+=10) << "\n";
429
430 a1++;
431 textCtrl << "Tomorrow= " << a1.FormatDate(wxFULL) << "\n";
432
433 wxDate tmpDate1("08/01/1991");
434 wxDate tmpDate2("07/14/1991");
435 textCtrl << "a1 (7-14-91) < 8-01-91 ? ==> " << ((a1 < tmpDate1) ? "TRUE" : "FALSE") << "\n";
436 textCtrl << "a1 (7-14-91) > 8-01-91 ? ==> " << ((a1 > tmpDate1) ? "TRUE" : "FALSE") << "\n";
437 textCtrl << "a1 (7-14-91)== 7-14-91 ? ==> " << ((a1==tmpDate2) ? "TRUE" : "FALSE") << "\n";
438
439 wxDate a3 = a1;
440 textCtrl << "a1 (7-14-91)== a3 (7-14-91) ? ==> " << ((a1==a3) ? "TRUE" : "FALSE") << "\n";
441 wxDate a4 = a1;
442 textCtrl << "a1 (7-14-91)== a4 (7-15-91) ? ==> " << ((a1==++a4) ? "TRUE" : "FALSE") << "\n";
443
444 wxDate a5 = wxString("today");
445 textCtrl << "Today is: " << a5 << "\n";
446 a4 = "TODAY";
447 textCtrl << "Today (a4) is: " << a4 << "\n";
448
449 textCtrl << "Today + 4 is: " << (a4+=4) << "\n";
450 a4 = "TODAY";
451 textCtrl << "Today - 4 is: " << (a4-=4) << "\n";
452
453 textCtrl << "=========== Leap Year Test ===========\n";
454 a1 = "1/15/1992";
455 textCtrl << a1.FormatDate(wxFULL) << " " << ((a1.IsLeapYear()) ? "Leap" : "non-Leap");
456 textCtrl << " " << "day of year: " << a1.GetDayOfYear() << "\n";
457
458 a1 = "2/16/1993";
459 textCtrl << a1.FormatDate(wxFULL) << " " << ((a1.IsLeapYear()) ? "Leap" : "non-Leap");
460 textCtrl << " " << "day of year: " << a1.GetDayOfYear() << "\n";
461
462 textCtrl << "================== string assignment test ====================\n";
463 wxString date_string=a1;
464 textCtrl << "a1 as a string (s/b 2/16/1993) ==> " << date_string << "\n";
465
466 textCtrl << "================== SetFormat test ============================\n";
467 a1.SetFormat(wxFULL);
468 textCtrl << "a1 (s/b FULL format) ==> " << a1 << "\n";
469 a1.SetFormat(wxEUROPEAN);
470 textCtrl << "a1 (s/b EUROPEAN format) ==> " << a1 << "\n";
471
472 textCtrl << "================== SetOption test ============================\n";
473 textCtrl << "Date abbreviation ON\n";
474
475 a1.SetOption(wxDATE_ABBR);
476 a1.SetFormat(wxMONTH);
477 textCtrl << "a1 (s/b MONTH format) ==> " << a1 << "\n";
478 a1.SetFormat(wxDAY);
479 textCtrl << "a1 (s/b DAY format) ==> " << a1 << "\n";
480 a1.SetFormat(wxFULL);
481 textCtrl << "a1 (s/b FULL format) ==> " << a1 << "\n";
482 a1.SetFormat(wxEUROPEAN);
483 textCtrl << "a1 (s/b EUROPEAN format) ==> " << a1 << "\n";
484 textCtrl << "Century suppression ON\n";
485 a1.SetOption(wxNO_CENTURY);
486 a1.SetFormat(wxMDY);
487 textCtrl << "a1 (s/b MDY format) ==> " << a1 << "\n";
488 textCtrl << "Century suppression OFF\n";
489 a1.SetOption(wxNO_CENTURY,FALSE);
490 textCtrl << "a1 (s/b MDY format) ==> " << a1 << "\n";
491 textCtrl << "Century suppression ON\n";
492 a1.SetOption(wxNO_CENTURY);
493 textCtrl << "a1 (s/b MDY format) ==> " << a1 << "\n";
494 a1.SetFormat(wxFULL);
495 textCtrl << "a1 (s/b FULL format) ==> " << a1 << "\n";
496
497 textCtrl << "\n=============== Version 4.0 Enhancement Test =================\n";
498
499 wxDate v4("11/26/1966");
500 textCtrl << "\n---------- Set Stuff -----------\n";
501 textCtrl << "First, 'Set' to today..." << "\n";
502 textCtrl << "Before 'Set' => " << v4 << "\n";
503 textCtrl << "After 'Set' => " << v4.Set() << "\n\n";
504
505 textCtrl << "Set to 11/26/66 => " << v4.Set(11,26,1966) << "\n";
506 textCtrl << "Current Julian => " << v4.GetJulianDate() << "\n";
507 textCtrl << "Set to Julian 2450000L => " << v4.Set(2450000L) << "\n";
508 textCtrl << "See! => " << v4.GetJulianDate() << "\n";
509
510 textCtrl << "---------- Add Stuff -----------\n";
511 textCtrl << "Start => " << v4 << "\n";
512 textCtrl << "Add 4 Weeks => " << v4.AddWeeks(4) << "\n";
513 textCtrl << "Sub 1 Month => " << v4.AddMonths(-1) << "\n";
514 textCtrl << "Add 2 Years => " << v4.AddYears(2) << "\n";
515
516 textCtrl << "---------- Misc Stuff -----------\n";
517 textCtrl << "The date aboves' day of the month is => " << v4.GetDay() << "\n";
518 textCtrl << "There are " << v4.GetDaysInMonth() << " days in this month.\n";
519 textCtrl << "The first day of this month lands on " << v4.GetFirstDayOfMonth() << "\n";
520 textCtrl << "This day happens to be " << v4.GetDayOfWeekName() << "\n";
521 textCtrl << "the " << v4.GetDayOfWeek() << " day of the week," << "\n";
522 textCtrl << "on the " << v4.GetWeekOfYear() << " week of the year," << "\n";
523 textCtrl << "on the " << v4.GetWeekOfMonth() << " week of the month, " << "\n";
524 textCtrl << "(which is " << v4.GetMonthName() << ")\n";
525 textCtrl << "the "<< v4.GetMonth() << "th month in the year.\n";
526 textCtrl << "The year alone is " << v4.GetYear() << "\n";
527
528 textCtrl << "---------- First and Last Stuff -----------\n";
529 v4.Set();
530 textCtrl << "The first date of this month is " << v4.GetMonthStart() << "\n";
531 textCtrl << "The last date of this month is " << v4.GetMonthEnd() << "\n";
532 textCtrl << "The first date of this year is " << v4.GetYearStart() << "\n";
533 textCtrl << "The last date of this year is " << v4.GetYearEnd() << "\n";
534 }
535
536 void MyApp::DoVariantDemo(wxCommandEvent& WXUNUSED(event) )
537 {
538 wxTextCtrl& textCtrl = * GetTextCtrl();
539
540 wxVariant var1 = "String value";
541 textCtrl << "var1 = " << var1.MakeString() << "\n";
542
543 // Conversion
544 wxString str = var1.MakeString();
545
546 var1 = 123.456;
547 textCtrl << "var1 = " << var1.GetReal() << "\n";
548
549 // Implicit conversion
550 double v = var1;
551
552 var1 = 9876L;
553 textCtrl << "var1 = " << var1.GetLong() << "\n";
554
555 // Implicit conversion
556 long l = var1;
557
558 // suppress compile warnings about unused variables
559 if ( l < v )
560 {
561 ;
562 }
563
564 wxStringList stringList;
565 stringList.Add(_T("one")); stringList.Add(_T("two")); stringList.Add(_T("three"));
566 var1 = stringList;
567 textCtrl << "var1 = " << var1.MakeString() << "\n";
568
569 var1.ClearList();
570 var1.Append(wxVariant(1.2345));
571 var1.Append(wxVariant("hello"));
572 var1.Append(wxVariant(54321L));
573
574 textCtrl << "var1 = " << var1.MakeString() << "\n";
575
576 size_t n = var1.GetCount();
577 size_t i;
578 for (i = (size_t) 0; i < n; i++)
579 {
580 textCtrl << "var1[" << (int) i << "] (type " << var1[i].GetType() << ") = " << var1[i].MakeString() << "\n";
581 }
582 }
583
584 BEGIN_EVENT_TABLE(MyFrame, wxFrame)
585 EVT_MENU(TYPES_QUIT, MyFrame::OnQuit)
586 EVT_MENU(TYPES_ABOUT, MyFrame::OnAbout)
587 END_EVENT_TABLE()
588
589 // My frame constructor
590 MyFrame::MyFrame(wxFrame *parent, const wxString& title,
591 const wxPoint& pos, const wxSize& size):
592 wxFrame(parent, -1, title, pos, size)
593 {}
594
595 void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event) )
596 {
597 Close(TRUE);
598 }
599
600 void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event) )
601 {
602 wxMessageDialog dialog(this, "Tests various wxWindows types",
603 "About Types", wxYES_NO|wxCANCEL);
604
605 dialog.ShowModal();
606 }
607
608