1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>wxWidgets: Samples Overview</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra_stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="page_container">
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0" style="width: 100%;">
<tbody>
<tr>
<td id="projectlogo">
<a href="http://www.wxwidgets.org/" target="_new">
<img alt="wxWidgets" src="logo.png"/>
</a>
</td>
<td style="padding-left: 0.5em; text-align: right;">
<span id="projectnumber">Version: 3.0.2</span>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Generated by Doxygen 1.8.2 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li class="current"><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Categories</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="index.html">Documentation</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">Samples Overview </div> </div>
</div><!--header-->
<div class="contents">
<div class="toc"><h3>Table of Contents</h3>
<ul><li class="level1"><a href="#page_samples_access">Accessibility Sample</a></li>
<li class="level1"><a href="#page_samples_animate">Animation Sample</a></li>
<li class="level1"><a href="#page_samples_artprov">Art Provider Sample</a></li>
<li class="level1"><a href="#page_samples_aui">Advanced User Interface Sample</a></li>
<li class="level1"><a href="#page_samples_calendar">Calendar Sample</a></li>
<li class="level1"><a href="#page_samples_caret">Caret Sample</a></li>
<li class="level1"><a href="#page_samples_collpane">Collapsible Pane Sample</a></li>
<li class="level1"><a href="#page_samples_combo">Combo Sample</a></li>
<li class="level1"><a href="#page_samples_config">Configuration Sample</a></li>
<li class="level1"><a href="#page_samples_console">Console Program Sample</a></li>
<li class="level1"><a href="#page_samples_controls">Controls Sample</a></li>
<li class="level1"><a href="#page_samples_dataview">wxDataViewCtrl Sample</a></li>
<li class="level1"><a href="#page_samples_clipboard">Clipboard Sample</a></li>
<li class="level1"><a href="#page_samples_debugrpt">Debug Reporter Sample</a></li>
<li class="level1"><a href="#page_samples_dialogs">Dialogs Sample</a></li>
<li class="level1"><a href="#page_samples_dialup">Dialup Sample</a></li>
<li class="level1"><a href="#page_samples_display">Display Sample</a></li>
<li class="level1"><a href="#page_samples_dnd">Drag & Drop Sample</a></li>
<li class="level1"><a href="#page_samples_docview">Document/View Sample</a></li>
<li class="level1"><a href="#page_samples_dragimag">Drag Image Sample</a></li>
<li class="level1"><a href="#page_samples_drawing">Drawing Sample</a></li>
<li class="level1"><a href="#page_samples_erase">Erase Event Sample</a></li>
<li class="level1"><a href="#page_samples_event">Event Sample</a></li>
<li class="level1"><a href="#page_samples_except">Exception Sample</a></li>
<li class="level1"><a href="#page_samples_exec">External Program Execution Sample</a></li>
<li class="level1"><a href="#page_samples_flash">Flash Sample</a></li>
<li class="level1"><a href="#page_samples_font">Font Sample</a></li>
<li class="level1"><a href="#page_samples_grid">Grid Sample</a></li>
<li class="level1"><a href="#page_samples_help">Help Sample</a></li>
<li class="level1"><a href="#page_samples_html">HTML Sample</a></li>
<li class="level1"><a href="#page_samples_htlbox">HTML List Box Sample</a></li>
<li class="level1"><a href="#page_samples_image">Image Sample</a></li>
<li class="level1"><a href="#page_samples_internat">Internationalization Sample</a></li>
<li class="level1"><a href="#page_samples_ipc">Connection Sample</a></li>
<li class="level1"><a href="#page_samples_joytest">Joystick Sample</a></li>
<li class="level1"><a href="#page_samples_keyboard">Key Event Sample</a></li>
<li class="level1"><a href="#page_samples_layout">Layout Sample</a></li>
<li class="level1"><a href="#page_samples_listctrl">List Control Sample</a></li>
<li class="level1"><a href="#page_samples_mdi">MDI Sample</a></li>
<li class="level1"><a href="#page_samples_mediaplayer">Mediaplayer Sample</a></li>
<li class="level1"><a href="#page_samples_memcheck">Memory Checking Sample</a></li>
<li class="level1"><a href="#page_samples_menu">Menu Sample</a></li>
<li class="level1"><a href="#page_samples_mfc">MFC Sample</a></li>
<li class="level1"><a href="#page_samples_minimal">Minimal Sample</a></li>
<li class="level1"><a href="#page_samples_nativdlg">Native Windows Dialog Sample</a></li>
<li class="level1"><a href="#page_samples_notebook">Notebook Sample</a></li>
<li class="level1"><a href="#page_samples_oleauto">OLE Automation Sample</a></li>
<li class="level1"><a href="#page_samples_opengl">OpenGL Sample</a></li>
<li class="level1"><a href="#page_samples_ownerdrw">Owner-drawn Sample</a></li>
<li class="level1"><a href="#page_samples_popup">Popup Transient Window Sample</a></li>
<li class="level1"><a href="#page_samples_power">Power Management Sample</a></li>
<li class="level1"><a href="#page_samples_printing">Printing Sample</a></li>
<li class="level1"><a href="#page_samples_propgrid">wxPropertyGrid Sample</a></li>
<li class="level1"><a href="#page_samples_regtest">Registry Sample</a></li>
<li class="level1"><a href="#page_samples_render">Render Sample</a></li>
<li class="level1"><a href="#page_samples_richtext">wxRichTextCtrl Sample</a></li>
<li class="level1"><a href="#page_samples_sashtest">Sash Sample</a></li>
<li class="level1"><a href="#page_samples_scroll">Scroll Window Sample</a></li>
<li class="level1"><a href="#page_samples_shaped">Shaped Window Sample</a></li>
<li class="level1"><a href="#page_samples_sockets">Sockets Sample</a></li>
<li class="level1"><a href="#page_samples_sound">Sound Sample</a></li>
<li class="level1"><a href="#page_samples_splash">Splash Screen Sample</a></li>
<li class="level1"><a href="#page_samples_splitter">Splitter Window Sample</a></li>
<li class="level1"><a href="#page_samples_statbar">Status Bar Sample</a></li>
<li class="level1"><a href="#page_samples_stc">wxStyledTextCtrl Sample</a></li>
<li class="level1"><a href="#page_samples_svg">SVG Sample</a></li>
<li class="level1"><a href="#page_samples_taborder">Tab Order Sample</a></li>
<li class="level1"><a href="#page_samples_taskbar">Task Bar Icon Sample</a></li>
<li class="level1"><a href="#page_samples_text">Text Sample</a></li>
<li class="level1"><a href="#page_samples_thread">Thread Sample</a></li>
<li class="level1"><a href="#page_samples_toolbar">Tool Bar Sample</a></li>
<li class="level1"><a href="#page_samples_treectrl">wxTreeCtrl Sample</a></li>
<li class="level1"><a href="#page_samples_typetest">Types Sample</a></li>
<li class="level1"><a href="#page_samples_uiaction">wxUIActionSimulator Sample</a></li>
<li class="level1"><a href="#page_samples_validate">Validator Sample</a></li>
<li class="level1"><a href="#page_samples_vscroll">VScrolled Window Sample</a></li>
<li class="level1"><a href="#page_samples_webview">wxWebView Sample</a></li>
<li class="level1"><a href="#page_samples_widgets">Widgets Sample</a></li>
<li class="level1"><a href="#page_samples_wizard">Wizard Sample</a></li>
<li class="level1"><a href="#page_samples_wrapsizer">wxWrapSizer Sample</a></li>
<li class="level1"><a href="#page_samples_xrc">XRC Sample</a></li>
</ul>
</div>
<div class="textblock"><p>Probably the best way to learn wxWidgets is by reading the source of some 80+ samples provided with it.</p>
<p>Many aspects of wxWidgets programming can be learned from them, but sometimes it is not simple to just choose the right sample to look at. This overview aims at describing what each sample does/demonstrates to make it easier to find the relevant one if a simple grep through all sources didn't help. They also provide some notes about using the samples and what features of wxWidgets are they supposed to test.</p>
<p>There are currently more than 80 different samples as part of wxWidgets: the list in this page is not complete! You should start your tour of wxWidgets with the <a class="el" href="page_samples.html#page_samples_minimal">Minimal Sample</a> which is the wxWidgets version of "Hello,
world!". It shows the basic structure of wxWidgets program and is the most commented sample of all - looking at its source code is recommended.</p>
<p>The next most useful sample is <a class="el" href="page_samples.html#page_samples_widgets">Widgets Sample</a> which shows many of wxWidgets controls, such as buttons, text entry zones, list boxes, check boxes, combo boxes etc. It is organized in many different source files, one per each control, which makes it easier to study it, and also allows to change various control styles and call its methods interactively.</p>
<p>Other, more complicated controls, have their own samples. In this category you may find the following samples showing the corresponding controls:</p>
<ul>
<li><a class="el" href="classwx_calendar_ctrl.html" title="The calendar control allows the user to pick a date.">wxCalendarCtrl</a>: <a class="el" href="page_samples.html#page_samples_calendar">Calendar Sample</a> </li>
<li><a class="el" href="classwx_list_ctrl.html" title="A list control presents lists in a number of formats: list view, report view, icon view and small ico...">wxListCtrl</a>: <a class="el" href="page_samples.html#page_samples_listctrl">List Control Sample</a> </li>
<li><a class="el" href="classwx_tree_ctrl.html" title="A tree control presents information as a hierarchy, with items that may be expanded to show further i...">wxTreeCtrl</a>: <a class="el" href="page_samples.html#page_samples_treectrl">wxTreeCtrl Sample</a> </li>
<li><a class="el" href="classwx_grid.html" title="wxGrid and its related classes are used for displaying and editing tabular data.">wxGrid</a>: <a class="el" href="page_samples.html#page_samples_grid">Grid Sample</a> </li>
<li><a class="el" href="classwx_data_view_ctrl.html" title="wxDataViewCtrl is a control to display data either in a tree like fashion or in a tabular form or bot...">wxDataViewCtrl</a>: <a class="el" href="page_samples.html#page_samples_dataview">wxDataViewCtrl Sample</a> </li>
<li><a class="el" href="classwx_web_view.html" title="This control may be used to render web (HTML / CSS / javascript) documents.">wxWebView</a>: <a class="el" href="page_samples.html#page_samples_webview">wxWebView Sample</a></li>
</ul>
<p>Notice that all wxWidgets samples mentioned above can be found in <code>samples</code> subdirectory of the library distribution. When a <code>foobar</code> sample is mentioned below, its sources can be found in <code>samples/foobar</code> directory of your wxWidgets tree. If you installed wxWidgets from a binary package, you might not have this directory. In this case, you may view the samples online at <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/</a> but you need to download the source distribution in order to be able to build them (highly recommended).</p>
<p>Final advice is to do a search in the entire samples directory if you can't find the sample showing the control you are interested in by name. Most classes contained in wxWidgets occur in at least one of the samples.</p>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000001">Todo:</a></b></dt><dd>Write descriptions for the samples who description started with "This sample demonstrates", they are semi-auto generated.</dd></dl>
<h1><a class="anchor" id="page_samples_access"></a>
Accessibility Sample</h1>
<p>This sample shows how you can use the <a class="el" href="classwx_accessible.html" title="The wxAccessible class allows wxWidgets applications, and wxWidgets itself, to return extended inform...">wxAccessible</a> classes in a simple GUI program.</p>
<p><b>Build Note:</b> You may need to build the wxWidgets library with <code>wxUSE_ACCESSIBILITY</code> being set to 1 to be able to make it work, please read comments in <code><wx/setup_inc.h></code> for more info.</p>
<p><em>Location:</em> <code>samples/access</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/access">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/access</a></p>
<h1><a class="anchor" id="page_samples_animate"></a>
Animation Sample</h1>
<p>This sample shows how you can use <a class="el" href="classwx_animation_ctrl.html" title="This is a static control which displays an animation.">wxAnimationCtrl</a> control and shows concept of a platform-dependent animation encapsulated in <a class="el" href="classwx_animation.html" title="This class encapsulates the concept of a platform-dependent animation.">wxAnimation</a>.</p>
<p><em>Location:</em> <code>samples/animate</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/animate">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/animate</a></p>
<h1><a class="anchor" id="page_samples_artprov"></a>
Art Provider Sample</h1>
<p>This sample shows how you can customize the look of standard wxWidgets dialogs by replacing default bitmaps/icons with your own versions. It also shows how you can use <a class="el" href="classwx_art_provider.html" title="wxArtProvider class is used to customize the look of wxWidgets application.">wxArtProvider</a> to get stock bitmaps for use in your application.</p>
<p><em>Location:</em> <code>samples/artprov</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/artprov">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/artprov</a></p>
<h1><a class="anchor" id="page_samples_aui"></a>
Advanced User Interface Sample</h1>
<p>This sample demonstrates <a class="el" href="overview_aui.html">AUI classes</a>.</p>
<p><em>Location:</em> <code>samples/aui</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/aui">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/aui</a></p>
<h1><a class="anchor" id="page_samples_calendar"></a>
Calendar Sample</h1>
<p>This sample shows the calendar control in action. It shows how to configure the control (see the different options in the calendar menu) and also how to process the notifications from it.</p>
<p><em>Location:</em> <code>samples/calendar</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/calendar">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/calendar</a></p>
<h1><a class="anchor" id="page_samples_caret"></a>
Caret Sample</h1>
<p>This sample demonstrates <a class="el" href="classwx_caret.html" title="A caret is a blinking cursor showing the position where the typed text will appear.">wxCaret</a>.</p>
<p><em>Location:</em> <code>samples/caret</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/caret">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/caret</a></p>
<h1><a class="anchor" id="page_samples_collpane"></a>
Collapsible Pane Sample</h1>
<p>This sample demonstrates <a class="el" href="classwx_collapsible_pane.html" title="A collapsible pane is a container with an embedded button-like control which can be used by the user ...">wxCollapsiblePane</a>.</p>
<p><em>Location:</em> <code>samples/collpane</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/collpane">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/collpane</a></p>
<h1><a class="anchor" id="page_samples_combo"></a>
Combo Sample</h1>
<p>This sample demonstrates <a class="el" href="classwx_combo_box.html" title="A combobox is like a combination of an edit control and a listbox.">wxComboBox</a>, <a class="el" href="classwx_combo_ctrl.html" title="A combo control is a generic combobox that allows totally custom popup.">wxComboCtrl</a> and <a class="el" href="classwx_owner_drawn_combo_box.html" title="wxOwnerDrawnComboBox is a combobox with owner-drawn list items.">wxOwnerDrawnComboBox</a> etc.</p>
<p><em>Location:</em> <code>samples/combo</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/combo">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/combo</a></p>
<h1><a class="anchor" id="page_samples_config"></a>
Configuration Sample</h1>
<p>This sample demonstrates the wxConfig classes in a platform independent way, i.e. it uses text based files to store a given configuration under Unix and uses the Registry under Windows.</p>
<p>See <a class="el" href="overview_config.html">wxConfig Overview</a> for the descriptions of all features of this class.</p>
<p><em>Location:</em> <code>samples/config</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/config">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/config</a></p>
<h1><a class="anchor" id="page_samples_console"></a>
Console Program Sample</h1>
<p>This sample demonstrates a console program.</p>
<p><em>Location:</em> <code>samples/console</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/console">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/console</a></p>
<h1><a class="anchor" id="page_samples_controls"></a>
Controls Sample</h1>
<p>The controls sample is the main test program for most simple controls used in wxWidgets. The sample tests their basic functionality, events, placement, modification in terms of colour and font as well as the possibility to change the controls programmatically, such as adding an item to a list box etc. Apart from that, the sample uses a <a class="el" href="classwx_notebook.html" title="This class represents a notebook control, which manages multiple windows with associated tabs...">wxNotebook</a> and tests most features of this special control (using bitmap in the tabs, using <a class="el" href="classwx_sizer.html" title="wxSizer is the abstract base class used for laying out subwindows in a window.">wxSizer</a> instances and <a class="el" href="classwx_layout_constraints.html">wxLayoutConstraints</a> within notebook pages, advancing pages programmatically and vetoing a page change by intercepting the wxNotebookEvent.</p>
<p>The various controls tested are listed here:</p>
<ul>
<li><a class="el" href="classwx_button.html" title="A button is a control that contains a text string, and is one of the most common elements of a GUI...">wxButton</a> </li>
<li><a class="el" href="classwx_bitmap_button.html" title="A bitmap button is a control that contains a bitmap.">wxBitmapButton</a> </li>
<li><a class="el" href="classwx_check_box.html" title="A checkbox is a labelled box which by default is either on (checkmark is visible) or off (no checkmar...">wxCheckBox</a> </li>
<li><a class="el" href="classwx_choice.html" title="A choice item is used to select one of a list of strings.">wxChoice</a> </li>
<li><a class="el" href="classwx_combo_box.html" title="A combobox is like a combination of an edit control and a listbox.">wxComboBox</a> </li>
<li><a class="el" href="classwx_gauge.html" title="A gauge is a horizontal or vertical bar which shows a quantity (often time).">wxGauge</a> </li>
<li><a class="el" href="classwx_static_box.html" title="A static box is a rectangle drawn around other windows to denote a logical grouping of items...">wxStaticBox</a> </li>
<li><a class="el" href="classwx_list_box.html" title="A listbox is used to select one or more of a list of strings.">wxListBox</a> </li>
<li><a class="el" href="classwx_spin_ctrl.html" title="wxSpinCtrl combines wxTextCtrl and wxSpinButton in one control.">wxSpinCtrl</a> </li>
<li><a class="el" href="classwx_spin_button.html" title="A wxSpinButton has two small up and down (or left and right) arrow buttons.">wxSpinButton</a> </li>
<li><a class="el" href="classwx_static_text.html" title="A static text control displays one or more lines of read-only text.">wxStaticText</a> </li>
<li><a class="el" href="classwx_static_bitmap.html" title="A static bitmap control displays a bitmap.">wxStaticBitmap</a> </li>
<li><a class="el" href="classwx_radio_box.html" title="A radio box item is used to select one of number of mutually exclusive choices.">wxRadioBox</a> </li>
<li><a class="el" href="classwx_radio_button.html" title="A radio button item is a button which usually denotes one of several mutually exclusive options...">wxRadioButton</a> </li>
<li><a class="el" href="classwx_slider.html" title="A slider is a control with a handle which can be pulled back and forth to change the value...">wxSlider</a></li>
</ul>
<p><em>Location:</em> <code>samples/controls</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/controls">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/controls</a></p>
<h1><a class="anchor" id="page_samples_dataview"></a>
wxDataViewCtrl Sample</h1>
<p>This sample demonstrates <a class="el" href="classwx_data_view_ctrl.html" title="wxDataViewCtrl is a control to display data either in a tree like fashion or in a tabular form or bot...">wxDataViewCtrl</a>.</p>
<p><em>Location:</em> <code>samples/dataview</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/dataview">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/dataview</a></p>
<h1><a class="anchor" id="page_samples_clipboard"></a>
Clipboard Sample</h1>
<p>This sample demonstrates <a class="el" href="classwx_clipboard.html" title="A class for manipulating the clipboard.">wxClipboard</a>.</p>
<p><em>Location:</em> <code>samples/clipboard</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/clipboard">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/clipboard</a></p>
<h1><a class="anchor" id="page_samples_debugrpt"></a>
Debug Reporter Sample</h1>
<p>This sample shows how to use <a class="el" href="classwx_debug_report.html" title="wxDebugReport is used to generate a debug report, containing information about the program current st...">wxDebugReport</a> class to generate a debug report in case of a program crash or otherwise. On start up, it proposes to either crash itself (by dereferencing a NULL pointer) or generate debug report without doing it. Next it initializes the debug report with standard information adding a custom file to it (just a timestamp) and allows to view the information gathered using <a class="el" href="classwx_debug_report_preview.html" title="This class presents the debug report to the user and allows him to veto report entirely or remove som...">wxDebugReportPreview</a>.</p>
<p>For the report processing part of the sample to work you should make available a Web server accepting form uploads, otherwise <a class="el" href="classwx_debug_report_upload.html" title="This class is used to upload a compressed file using HTTP POST request.">wxDebugReportUpload</a> will report an error.</p>
<p><b>Build Note:</b> You may need to build the wxWidgets library with <code>wxUSE_DEBUGREPORT</code> and <code> wxUSE_ON_FATAL_EXCEPTION</code> being set to 1 to be able to make it work, please read comments in <code><wx/setup_inc.h></code> for more info.</p>
<p><em>Location:</em> <code>samples/debugrpt</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/debugrpt">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/debugrpt</a></p>
<h1><a class="anchor" id="page_samples_dialogs"></a>
Dialogs Sample</h1>
<p>This sample shows how to use the common dialogs available from wxWidgets. These dialogs are described in detail in the <a class="el" href="overview_cmndlg.html">Common Dialogs</a>.</p>
<p>In addition to the dialogs accessible from the sample menus, you can also run it with a <code>–progress=style</code> command line option to show a <a class="el" href="classwx_progress_dialog.html" title="If supported by the platform this class will provide the platform's native progress dialog...">wxProgressDialog</a> with the given style (try 0 for the default style) on program startup, before the main window is shown.</p>
<p><em>Location:</em> <code>samples/dialogs</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/dialogs">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/dialogs</a></p>
<h1><a class="anchor" id="page_samples_dialup"></a>
Dialup Sample</h1>
<p>This sample shows the <a class="el" href="classwx_dial_up_manager.html" title="This class encapsulates functions dealing with verifying the connection status of the workstation (co...">wxDialUpManager</a> class. In the status bar, it displays the information gathered through its interface: in particular, the current connection status (online or offline) and whether the connection is permanent (in which case a string `LAN' appears in the third status bar field - but note that you may be on a LAN not connected to the Internet, in which case you will not see this) or not.</p>
<p>Using the menu entries, you may also dial or hang up the line if you have a modem attached and (this only makes sense for Windows) list the available connections.</p>
<p><em>Location:</em> <code>samples/dialup</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/dialup">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/dialup</a></p>
<h1><a class="anchor" id="page_samples_display"></a>
Display Sample</h1>
<p>This sample demonstrates <a class="el" href="classwx_display.html" title="Determines the sizes and locations of displays connected to the system.">wxDisplay</a>.</p>
<p><em>Location:</em> <code>samples/display</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/display">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/display</a></p>
<h1><a class="anchor" id="page_samples_dnd"></a>
Drag & Drop Sample</h1>
<p>This sample shows both clipboard and drag and drop in action. It is quite non trivial and may be safely used as a basis for implementing the clipboard and drag and drop operations in a real-life program.</p>
<p>When you run the sample, its screen is split in several parts. On the top, there are two listboxes which show the standard derivations of <a class="el" href="classwx_drop_target.html" title="This class represents a target for a drag and drop operation.">wxDropTarget</a>: <a class="el" href="classwx_text_drop_target.html" title="A predefined drop target for dealing with text data.">wxTextDropTarget</a> and <a class="el" href="classwx_file_drop_target.html" title="This is a drop target which accepts files (dragged from File Manager or Explorer).">wxFileDropTarget</a>.</p>
<p>The middle of the sample window is taken by the log window which shows what is going on (of course, this only works in debug builds) and may be helpful to see the sequence of steps of data transfer.</p>
<p>Finally, the last part is used for dragging text from it to either one of the listboxes (only one will accept it) or another application. The last functionality available from the main frame is to paste a bitmap from the clipboard (or, in the case of the Windows version, also a metafile) - it will be shown in a new frame.</p>
<p>So far, everything we mentioned was implemented with minimal amount of code using standard wxWidgets classes. The more advanced features are demonstrated if you create a shape frame from the main frame menu. A shape is a geometric object which has a position, size and color. It models some application-specific data in this sample. A shape object supports its own private <a class="el" href="classwx_data_format.html" title="A wxDataFormat is an encapsulation of a platform-specific format handle which is used by the system f...">wxDataFormat</a> which means that you may cut and paste it or drag and drop (between one and the same or different shapes) from one sample instance to another (or the same). However, chances are that no other program supports this format and so shapes can also be rendered as bitmaps which allows them to be pasted/dropped in many other applications (and, under Windows, also as metafiles which are supported by most of Windows programs as well - try Write/Wordpad, for example).</p>
<p>Take a look at DnDShapeDataObject class to see how you may use <a class="el" href="classwx_data_object.html" title="A wxDataObject represents data that can be copied to or from the clipboard, or dragged and dropped...">wxDataObject</a> to achieve this.</p>
<p><em>Location:</em> <code>samples/dnd</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/dnd">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/dnd</a></p>
<h1><a class="anchor" id="page_samples_docview"></a>
Document/View Sample</h1>
<p>This sample demonstrates <a class="el" href="overview_docview.html">Document/View Framework</a>.</p>
<p><em>Location:</em> <code>samples/docview</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/docview">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/docview</a></p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="page_samples.html#page_samples_mdi">MDI Sample</a></dd></dl>
<h1><a class="anchor" id="page_samples_dragimag"></a>
Drag Image Sample</h1>
<p>This sample demonstrates <a class="el" href="classwx_drag_image.html" title="This class is used when you wish to drag an object on the screen, and a simple cursor is not enough...">wxDragImage</a>.</p>
<p><em>Location:</em> <code>samples/dragimag</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/dragimag">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/dragimag</a></p>
<h1><a class="anchor" id="page_samples_drawing"></a>
Drawing Sample</h1>
<p>This sample demonstrates the drawing ability of <a class="el" href="classwx_d_c.html" title="A wxDC is a "device context" onto which graphics and text can be drawn.">wxDC</a>.</p>
<p><em>Location:</em> <code>samples/drawing</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/drawing">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/drawing</a></p>
<h1><a class="anchor" id="page_samples_erase"></a>
Erase Event Sample</h1>
<p>This sample demonstrates <a class="el" href="classwx_erase_event.html" title="An erase event is sent when a window's background needs to be repainted.">wxEraseEvent</a>.</p>
<p><em>Location:</em> <code>samples/erase</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/erase">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/erase</a></p>
<h1><a class="anchor" id="page_samples_event"></a>
Event Sample</h1>
<p>This sample demonstrates various features of the wxWidgets events. It shows how to dynamic events and connecting/disconnecting the event handlers during run time by using <a class="el" href="classwx_evt_handler.html#a78719e8b82c9f9c6e4056b3449df1943" title="Connects the given function dynamically with the event handler, id and event type.">wxEvtHandler::Connect()</a> and <a class="el" href="classwx_evt_handler.html#a13061cf0ed01ac10a804ac057ef4bdbc" title="Disconnects the given function dynamically from the event handler, using the specified parameters as ...">wxEvtHandler::Disconnect()</a>, and also how to use <a class="el" href="classwx_window.html#a398c11ab9af7956067a964f560d1978c" title="Pushes this event handler onto the event stack for the window.">wxWindow::PushEventHandler()</a> and <a class="el" href="classwx_window.html#ac45c1f4cf96c70779764c14cf528790b" title="Removes and returns the top-most event handler on the event handler stack.">wxWindow::PopEventHandler()</a>.</p>
<p><em>Location:</em> <code>samples/event</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/event">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/event</a></p>
<h1><a class="anchor" id="page_samples_except"></a>
Exception Sample</h1>
<p>This very simple sample shows how to use C++ exceptions in wxWidgets programs, i.e. where to catch the exception which may be thrown by the program code. It doesn't do anything very exciting by itself, you need to study its code to understand what goes on.</p>
<p><b>Build Note:</b> You need to build the library with <code>wxUSE_EXCEPTIONS</code> being set to <code>1</code> and compile your code with C++ exceptions support to be able to build this sample.</p>
<p><em>Location:</em> <code>samples/except</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/except">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/except</a></p>
<h1><a class="anchor" id="page_samples_exec"></a>
External Program Execution Sample</h1>
<p>The exec sample demonstrates the wxExecute and wxShell functions. Both of them are used to execute the external programs and the sample shows how to do this synchronously (waiting until the program terminates) or asynchronously (notification will come later).</p>
<p>It also shows how to capture the output of the child process in both synchronous and asynchronous cases and how to kill the processes with <a class="el" href="classwx_process.html#a6b3ff71a9d026d93600add4cbb72a172" title="Send the specified signal to the given process.">wxProcess::Kill()</a> and test for their existence with <a class="el" href="classwx_process.html#a3c81aa4ef5b6b76018e245f0b004f51b" title="Returns true if the given process exists in the system.">wxProcess::Exists()</a>.</p>
<p><em>Location:</em> <code>samples/exec</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/exec">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/exec</a></p>
<h1><a class="anchor" id="page_samples_flash"></a>
Flash Sample</h1>
<p>The flash sample demonstrates embedding of Adobe Flash into a wxWidgets program. Currently it only works under Windows as it uses the Flash ActiveX control to achieve this but we hope to be able to extend it to also work under other platforms in the future. The sample also currently requires Microsoft Visual C++ compiler as it uses COM support extensions specific to this compiler.</p>
<p>The sample comes with 2 Flash files (SWF), showing a simple Flash animation which can be controlled using the "Play", "Stop" and "Back"/"Forward" buttons in the sample as well as a Flash form which shows how Flash and wxWidgets program can exchange data: calling "GetText" function without arguments returns the text of the text control defined inside Flash and calling "SetText" with an argument sets the control contents to the given string. Finally clicking on the button generates an event which is caught by the C++ program.</p>
<h1><a class="anchor" id="page_samples_font"></a>
Font Sample</h1>
<p>The font sample demonstrates <a class="el" href="classwx_font.html" title="A font is an object which determines the appearance of text.">wxFont</a>, <a class="el" href="classwx_font_enumerator.html" title="wxFontEnumerator enumerates either all available fonts on the system or only the ones with given attr...">wxFontEnumerator</a> and <a class="el" href="classwx_font_mapper.html" title="wxFontMapper manages user-definable correspondence between logical font names and the fonts present o...">wxFontMapper</a> classes. It allows you to see the fonts available (to wxWidgets) on the computer and shows all characters of the chosen font as well.</p>
<p><em>Location:</em> <code>samples/font</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/font">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/font</a></p>
<h1><a class="anchor" id="page_samples_grid"></a>
Grid Sample</h1>
<p>This sample demonstrates <a class="el" href="classwx_grid.html" title="wxGrid and its related classes are used for displaying and editing tabular data.">wxGrid</a>.</p>
<p><em>Location:</em> <code>samples/grid</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/grid">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/grid</a></p>
<h1><a class="anchor" id="page_samples_help"></a>
Help Sample</h1>
<p>This sample demonstrates <a class="el" href="classwx_help_controller.html" title="This is an alias for one of a family of help controller classes which is most appropriate for the cur...">wxHelpController</a>.</p>
<p><em>Location:</em> <code>samples/help</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/help">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/help</a></p>
<h1><a class="anchor" id="page_samples_html"></a>
HTML Sample</h1>
<p>Eight HTML samples cover all features of the HTML sub-library.</p>
<ul>
<li><b>Test</b> demonstrates how to create <a class="el" href="classwx_html_window.html" title="wxHtmlWindow is probably the only class you will directly use unless you want to do something special...">wxHtmlWindow</a> and also shows most supported HTML tags.</li>
</ul>
<ul>
<li><b>Widget</b> shows how you can embed ordinary controls or windows within an HTML page. It also nicely explains how to write new tag handlers and extend the library to work with unsupported tags.</li>
</ul>
<ul>
<li><b>About</b> may give you an idea how to write good-looking About boxes.</li>
</ul>
<ul>
<li><b>Zip</b> demonstrates use of virtual file systems in wxHTML. The zip archives handler (ships with wxWidgets) allows you to access HTML pages stored in a compressed archive as if they were ordinary files.</li>
</ul>
<ul>
<li><b>Virtual</b> is yet another virtual file systems demo. This one generates pages at run-time. You may find it useful if you need to display some reports in your application.</li>
</ul>
<ul>
<li><b>Printing</b> explains use of <a class="el" href="classwx_html_easy_printing.html" title="This class provides very simple interface to printing architecture.">wxHtmlEasyPrinting</a> class which serves as as-simple-as-possible interface for printing HTML documents without much work. In fact, only few function calls are sufficient.</li>
</ul>
<ul>
<li><b>Help</b> and <b>Helpview</b> are variations on displaying HTML help (compatible with MS HTML Help Workshop). <em>Help</em> shows how to embed <a class="el" href="classwx_html_help_controller.html" title="This help controller provides an easy way of displaying HTML help in your application (see HTML Sampl...">wxHtmlHelpController</a> in your application while <em>Helpview</em> is a simple tool that only pops up the help window and displays help books given at command line.</li>
</ul>
<p><em>Location:</em> <code>samples/html</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/html">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/html</a></p>
<h1><a class="anchor" id="page_samples_htlbox"></a>
HTML List Box Sample</h1>
<p>This sample demonstrates <a class="el" href="classwx_html_list_box.html" title="wxHtmlListBox is an implementation of wxVListBox which shows HTML content in the listbox rows...">wxHtmlListBox</a>.</p>
<p><em>Location:</em> <code>samples/htlbox</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/htlbox">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/htlbox</a></p>
<h1><a class="anchor" id="page_samples_image"></a>
Image Sample</h1>
<p>The image sample demonstrates use of the <a class="el" href="classwx_image.html" title="This class encapsulates a platform-independent image.">wxImage</a> class and shows how to download images in a variety of formats, currently PNG, GIF, TIFF, JPEG, BMP, PNM and PCX. The top of the sample shows two rectangles, one of which is drawn directly in the window, the other one is drawn into a <a class="el" href="classwx_bitmap.html" title="This class encapsulates the concept of a platform-dependent bitmap, either monochrome or colour or co...">wxBitmap</a>, converted to a <a class="el" href="classwx_image.html" title="This class encapsulates a platform-independent image.">wxImage</a>, saved as a PNG image and then reloaded from the PNG file again so that conversions between <a class="el" href="classwx_image.html" title="This class encapsulates a platform-independent image.">wxImage</a> and <a class="el" href="classwx_bitmap.html" title="This class encapsulates the concept of a platform-dependent bitmap, either monochrome or colour or co...">wxBitmap</a> as well as loading and saving PNG files are tested.</p>
<p>At the bottom of the main frame there is a test for using a monochrome bitmap by drawing into a <a class="el" href="classwx_memory_d_c.html" title="A memory device context provides a means to draw graphics onto a bitmap.">wxMemoryDC</a>. The bitmap is then drawn specifying the foreground and background colours with <a class="el" href="classwx_d_c.html#aeac811df9a1688ce875117f3049849d6" title="Sets the current text foreground colour for the DC.">wxDC::SetTextForeground()</a> and <a class="el" href="classwx_d_c.html#a3ed22bd0a0b835d4d085261bb022766b" title="Sets the current text background colour for the DC.">wxDC::SetTextBackground()</a> (on the left). The bitmap is then converted to a <a class="el" href="classwx_image.html" title="This class encapsulates a platform-independent image.">wxImage</a> and the foreground colour (black) is replaced with red using <a class="el" href="classwx_image.html#aec8466530f4aea8e2cea8cb24bfb74fb" title="Replaces the colour specified by r1,g1,b1 by the colour r2,g2,b2.">wxImage::Replace()</a>.</p>
<p>This sample also contains the code for testing the image rotation and resizing and using raw bitmap access, see the corresponding menu commands.</p>
<p><em>Location:</em> <code>samples/image</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/image">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/image</a></p>
<h1><a class="anchor" id="page_samples_internat"></a>
Internationalization Sample</h1>
<p>The not very clearly named internat sample demonstrates the wxWidgets internationalization (i18n for short from now on) features. To be more precise, it only shows localization support, i.e. support for translating the program messages into another language while true i18n would also involve changing the other aspects of the program's behaviour.</p>
<p>More information about this sample can be found in the <code>readme.txt</code> file in its directory. Please also see the <a class="el" href="overview_i18n.html">Internationalization</a> overview.</p>
<p><em>Location:</em> <code>samples/internat</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/internat">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/internat</a></p>
<h1><a class="anchor" id="page_samples_ipc"></a>
Connection Sample</h1>
<p>This sample demonstrates <a class="el" href="classwx_connection.html" title="A wxConnection object represents the connection between a client and a server.">wxConnection</a>.</p>
<p><em>Location:</em> <code>samples/ipc</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/ipc">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/ipc</a></p>
<h1><a class="anchor" id="page_samples_joytest"></a>
Joystick Sample</h1>
<p>This sample demonstrates <a class="el" href="classwx_joystick.html" title="wxJoystick allows an application to control one or more joysticks.">wxJoystick</a>.</p>
<p><em>Location:</em> <code>samples/joytest</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/joytest">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/joytest</a></p>
<h1><a class="anchor" id="page_samples_keyboard"></a>
Key Event Sample</h1>
<p>This sample demonstrates <a class="el" href="classwx_key_event.html" title="This event class contains information about key press and release events.">wxKeyEvent</a>.</p>
<p>This sample can be used to interactively test the events produced by pressing various keyboard keys. It also shows the interaction between accelerators and the normal keyboard events (which are overridden by any defined accelerators) and finally allows to test that not skipping an event in EVT_KEY_DOWN handler suppresses the subsequent EVT_CHAR event.</p>
<p><em>Location:</em> <code>samples/keyboard</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/keyboard">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/keyboard</a></p>
<h1><a class="anchor" id="page_samples_layout"></a>
Layout Sample</h1>
<p>The layout sample demonstrates the two different layout systems offered by wxWidgets. When starting the program, you will see a frame with some controls and some graphics. The controls will change their size whenever you resize the entire frame and the exact behaviour of the size changes is determined using the <a class="el" href="classwx_layout_constraints.html">wxLayoutConstraints</a> class. See also the overview and the <a class="el" href="classwx_individual_layout_constraint.html">wxIndividualLayoutConstraint</a> class for further information.</p>
<p>The menu in this sample offers two more tests, one showing how to use a <a class="el" href="classwx_box_sizer.html" title="The basic idea behind a box sizer is that windows will most often be laid out in rather simple basic ...">wxBoxSizer</a> in a simple dialog and the other one showing how to use sizers in connection with a <a class="el" href="classwx_notebook.html" title="This class represents a notebook control, which manages multiple windows with associated tabs...">wxNotebook</a> class. See also <a class="el" href="classwx_sizer.html" title="wxSizer is the abstract base class used for laying out subwindows in a window.">wxSizer</a>.</p>
<p><em>Location:</em> <code>samples/layout</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/layout">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/layout</a></p>
<h1><a class="anchor" id="page_samples_listctrl"></a>
List Control Sample</h1>
<p>This sample shows the <a class="el" href="classwx_list_ctrl.html" title="A list control presents lists in a number of formats: list view, report view, icon view and small ico...">wxListCtrl</a> control. Different modes supported by the control (list, icons, small icons, report) may be chosen from the menu.</p>
<p>The sample also provides some timings for adding/deleting/sorting a lot of (several thousands) items into the control.</p>
<p><em>Location:</em> <code>samples/listctrl</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/listctrl">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/listctrl</a></p>
<h1><a class="anchor" id="page_samples_mdi"></a>
MDI Sample</h1>
<p>This sample demonstrates MDI.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="page_samples.html#page_samples_docview">Document/View Sample</a></dd></dl>
<p><em>Location:</em> <code>samples/mdi</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/mdi">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/mdi</a></p>
<h1><a class="anchor" id="page_samples_mediaplayer"></a>
Mediaplayer Sample</h1>
<p>This sample demonstrates how to use all the features of <a class="el" href="classwx_media_ctrl.html" title="wxMediaCtrl is a class for displaying types of media, such as videos, audio files, natively through native codecs.">wxMediaCtrl</a> and play various types of sound, video, and other files.</p>
<p>It replaces the old <code>dynamic</code> sample.</p>
<p><em>Location:</em> <code>samples/mediaplayer</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/mediaplayer">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/mediaplayer</a></p>
<h1><a class="anchor" id="page_samples_memcheck"></a>
Memory Checking Sample</h1>
<p>This sample demonstrates memory tracing using <a class="el" href="classwx_debug_context.html" title="A class for performing various debugging and memory tracing operations.">wxDebugContext</a>.</p>
<p><em>Location:</em> <code>samples/memcheck</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/memcheck">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/memcheck</a></p>
<p><b>Build Note:</b> You may need to build the wxWidgets library with <code>wxUSE_MEMORY_TRACING</code> and <code> wxUSE_DEBUG_CONTEXT</code> being set to 1 to be able to make it work, please read comments in <code><wx/setup_inc.h></code> for more info.</p>
<h1><a class="anchor" id="page_samples_menu"></a>
Menu Sample</h1>
<p>This sample demonstrates <a class="el" href="classwx_menu.html" title="A menu is a popup (or pull down) list of items, one of which may be selected before the menu goes awa...">wxMenu</a> classes.</p>
<p><em>Location:</em> <code>samples/menu</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/menu">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/menu</a></p>
<h1><a class="anchor" id="page_samples_mfc"></a>
MFC Sample</h1>
<p>This sample demonstrates how to mix MFC and wxWidgets code. It pops up an initial wxWidgets frame, with a menu item that allows a new MFC window to be created.</p>
<p>For build instructions please read IMPORTANT NOTES in <code>mfctest.cpp</code>.</p>
<div><span class="avail">Availability:</span>  only available for the <a class="el" href="page_port.html#page_port_wxmsw">wxMSW</a> port.</div> <p><em>Location:</em> <code>samples/mfc</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/mfc">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/mfc</a></p>
<h1><a class="anchor" id="page_samples_minimal"></a>
Minimal Sample</h1>
<p>The minimal sample is what most people will know under the term Hello World, i.e. a minimal program that doesn't demonstrate anything apart from what is needed to write a program that will display a "hello" dialog. This is usually a good starting point for learning how to use wxWidgets.</p>
<p><em>Location:</em> <code>samples/minimal</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/minimal">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/minimal</a></p>
<h1><a class="anchor" id="page_samples_nativdlg"></a>
Native Windows Dialog Sample</h1>
<p>This sample demonstrates native windows dialog.</p>
<div><span class="avail">Availability:</span>  only available for the <a class="el" href="page_port.html#page_port_wxmsw">wxMSW</a> port.</div> <p><em>Location:</em> <code>samples/nativdlg</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/nativdlg">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/nativdlg</a></p>
<h1><a class="anchor" id="page_samples_notebook"></a>
Notebook Sample</h1>
<p>This samples shows wxBookCtrl family of controls. Although initially it was written to demonstrate <a class="el" href="classwx_notebook.html" title="This class represents a notebook control, which manages multiple windows with associated tabs...">wxNotebook</a> only, it can now be also used to see <a class="el" href="classwx_listbook.html" title="wxListbook is a class similar to wxNotebook but which uses a wxListCtrl to show the labels instead of...">wxListbook</a>, <a class="el" href="classwx_choicebook.html" title="wxChoicebook is a class similar to wxNotebook, but uses a wxChoice control to show the labels instead...">wxChoicebook</a>, <a class="el" href="classwx_treebook.html" title="This class is an extension of the wxNotebook class that allows a tree structured set of pages to be s...">wxTreebook</a> and <a class="el" href="classwx_toolbook.html" title="wxToolbook is a class similar to wxNotebook but which uses a wxToolBar to show the labels instead of ...">wxToolbook</a> in action. Test each of the controls, their orientation, images and pages using commands through the menu.</p>
<p><em>Location:</em> <code>samples/notebook</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/notebook">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/notebook</a></p>
<h1><a class="anchor" id="page_samples_oleauto"></a>
OLE Automation Sample</h1>
<p>This sample demonstrates OLE automation using <a class="el" href="classwx_automation_object.html" title="The wxAutomationObject class represents an OLE automation object containing a single data member...">wxAutomationObject</a>.</p>
<div><span class="avail">Availability:</span>  only available for the <a class="el" href="page_port.html#page_port_wxmsw">wxMSW</a> port.</div> <p><em>Location:</em> <code>samples/oleauto</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/oleauto">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/oleauto</a></p>
<h1><a class="anchor" id="page_samples_opengl"></a>
OpenGL Sample</h1>
<p>This sample demonstrates <a class="el" href="classwx_g_l_canvas.html" title="wxGLCanvas is a class for displaying OpenGL graphics.">wxGLCanvas</a>.</p>
<ul>
<li><b>cube</b> Draws a cube to demonstrate how to write a basic wxWidgets OpenGL program. Arrow keys rotate the cube. Space bar toggles spinning. </li>
<li><b>isosurf</b> Draws a surface by reading coordinates from a DAT file. </li>
<li><b>penguin</b> Draws a rotatable penguin by reading data from a DXF file.</li>
</ul>
<p><em>Location:</em> <code>samples/opengl</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/opengl">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/opengl</a></p>
<h1><a class="anchor" id="page_samples_ownerdrw"></a>
Owner-drawn Sample</h1>
<p>This sample demonstrates owner-drawn <a class="el" href="classwx_menu_item.html" title="A menu item represents an item in a menu.">wxMenuItem</a>, wxCheckList and <a class="el" href="classwx_list_box.html" title="A listbox is used to select one or more of a list of strings.">wxListBox</a>.</p>
<p><em>Location:</em> <code>samples/ownerdrw</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/ownerdrw">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/ownerdrw</a></p>
<h1><a class="anchor" id="page_samples_popup"></a>
Popup Transient Window Sample</h1>
<p>This sample demonstrates <a class="el" href="classwx_popup_transient_window.html" title="A wxPopupWindow which disappears automatically when the user clicks mouse outside it or if it loses f...">wxPopupTransientWindow</a>.</p>
<p><em>Location:</em> <code>samples/popup</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/popup">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/popup</a></p>
<h1><a class="anchor" id="page_samples_power"></a>
Power Management Sample</h1>
<p>This sample demonstrates wxWidgets power management.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_power_event.html" title="The power events are generated when the system power state changes, e.g.">wxPowerEvent</a></dd></dl>
<p><em>Location:</em> <code>samples/power</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/power">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/power</a></p>
<h1><a class="anchor" id="page_samples_printing"></a>
Printing Sample</h1>
<p>This sample demonstrates printing.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="overview_printing.html">Printing Framework Overview</a>, <a class="el" href="overview_unixprinting.html">Printing Under Unix (GTK+)</a></dd></dl>
<p><b>Build Note:</b> You may need to build the wxWidgets library with <code>wxUSE_PRINTING_ARCHITECTURE</code> being set to 1 to be able to make it work, please read comments in <code><wx/setup_inc.h></code> for more info.</p>
<p><em>Location:</em> <code>samples/printing</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/printing">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/printing</a></p>
<h1><a class="anchor" id="page_samples_propgrid"></a>
wxPropertyGrid Sample</h1>
<p>Sample application has following additional examples of custom properties:</p>
<ul>
<li>wxFontDataProperty ( edits <a class="el" href="classwx_font_data.html" title="This class holds a variety of information related to font dialogs.">wxFontData</a> )</li>
<li>wxPointProperty ( edits <a class="el" href="classwx_point.html" title="A wxPoint is a useful data structure for graphics operations.">wxPoint</a> )</li>
<li>wxSizeProperty ( edits <a class="el" href="classwx_size.html" title="A wxSize is a useful data structure for graphics operations.">wxSize</a> )</li>
<li>wxAdvImageFileProperty ( like wxImageFileProperty, but also has a drop-down for recent image selection )</li>
<li>wxDirsProperty ( edits a <a class="el" href="classwx_array_string.html" title="wxArrayString is an efficient container for storing wxString objects.">wxArrayString</a> consisting of directory strings)</li>
<li>wxArrayDoubleProperty ( edits wxArrayDouble )</li>
</ul>
<p>This sample demonstrates <a class="el" href="classwx_property_grid.html" title="wxPropertyGrid is a specialized grid for editing properties - in other words name = value pairs...">wxPropertyGrid</a>.</p>
<p><em>Location:</em> <code>samples/propgrid</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/propgrid">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/propgrid</a></p>
<h1><a class="anchor" id="page_samples_regtest"></a>
Registry Sample</h1>
<p>This sample demonstrates <a class="el" href="classwx_reg_key.html" title="wxRegKey is a class representing the Windows registry (it is only available under Windows)...">wxRegKey</a>.</p>
<div><span class="avail">Availability:</span>  only available for the <a class="el" href="page_port.html#page_port_wxmsw">wxMSW</a> port.</div> <p><em>Location:</em> <code>samples/regtest</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/regtest">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/regtest</a></p>
<h1><a class="anchor" id="page_samples_render"></a>
Render Sample</h1>
<p>This sample shows how to replace the default wxWidgets renderer and also how to write a shared library (DLL) implementing a renderer and load and unload it during the run-time.</p>
<p><em>Location:</em> <code>samples/render</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/render">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/render</a></p>
<h1><a class="anchor" id="page_samples_richtext"></a>
wxRichTextCtrl Sample</h1>
<p>This sample demonstrates <a class="el" href="classwx_rich_text_ctrl.html" title="wxRichTextCtrl provides a generic, ground-up implementation of a text control capable of showing mult...">wxRichTextCtrl</a>.</p>
<p><em>Location:</em> <code>samples/richtext</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/richtext">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/richtext</a></p>
<h1><a class="anchor" id="page_samples_sashtest"></a>
Sash Sample</h1>
<p>This sample demonstrates <a class="el" href="classwx_sash_window.html" title="wxSashWindow allows any of its edges to have a sash which can be dragged to resize the window...">wxSashWindow</a> classes.</p>
<p><em>Location:</em> <code>samples/sashtest</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/sashtest">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/sashtest</a></p>
<h1><a class="anchor" id="page_samples_scroll"></a>
Scroll Window Sample</h1>
<p>This sample demonstrates wxScrolledWindow.</p>
<p>This sample demonstrates use of the <a class="el" href="group__group__class__miscwnd.html#ga695bec5996cd4d5512d1a01cfdcf96a5" title="Scrolled window derived from wxPanel.">wxScrolledWindow</a> class including placing subwindows into it and drawing simple graphics. It uses the SetTargetWindow method and thus the effect of scrolling does not show in the scrolled window itself, but in one of its subwindows.</p>
<p>Additionally, this samples demonstrates how to optimize drawing operations in wxWidgets, in particular using the <a class="el" href="classwx_window.html#af27ef77c913e32050543f3b0ca435a0d" title="Returns true if the given point or rectangle area has been exposed since the last repaint...">wxWindow::IsExposed()</a> method with the aim to prevent unnecessary drawing in the window and thus reducing or removing flicker on screen.</p>
<p><em>Location:</em> <code>samples/scroll</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/scroll">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/scroll</a></p>
<h1><a class="anchor" id="page_samples_shaped"></a>
Shaped Window Sample</h1>
<p>This sample demonstrates how to implement a shaped or transparent window, and a window showing/hiding with effect.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_non_owned_window.html#a7f223eadbd72caea66efcb0b55e89613" title="If the platform supports it, sets the shape of the window to that depicted by region.">wxTopLevelWindow::SetShape()</a>, <a class="el" href="classwx_top_level_window.html#a8e37aff45a001a83ff49745298a6978e" title="If the platform supports it will set the window to be translucent.">wxTopLevelWindow::SetTransparent()</a>, <a class="el" href="classwx_window.html#a596b1715edfc7609f352b2e000ecbaec" title="This function shows a window, like Show(), but using a special visual effect if possible.">wxWindow::ShowWithEffect()</a>, <a class="el" href="classwx_window.html#a5326fbb26557a224507a1c06e5640e89" title="This function hides a window, like Hide(), but using a special visual effect if possible.">wxWindow::HideWithEffect()</a></dd></dl>
<p><em>Location:</em> <code>samples/shaped</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/shaped">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/shaped</a></p>
<h1><a class="anchor" id="page_samples_sockets"></a>
Sockets Sample</h1>
<p>The sockets sample demonstrates how to use the communication facilities provided by wxSocket. There are two different applications in this sample: a server, which is implemented using a <a class="el" href="classwx_socket_server.html">wxSocketServer</a> object, and a client, which is implemented as a <a class="el" href="classwx_socket_client.html">wxSocketClient</a>.</p>
<p>The server binds to the local address, using TCP port number 3000, sets up an event handler to be notified of incoming connection requests (<b>wxSOCKET_CONNECTION</b> events), and sits there, waiting for clients (<em>listening</em>, in socket parlance). For each accepted connection, a new <a class="el" href="classwx_socket_base.html" title="wxSocketBase is the base class for all socket-related objects, and it defines all basic IO functional...">wxSocketBase</a> object is created. These socket objects are independent from the server that created them, so they set up their own event handler, and then request to be notified of <b>wxSOCKET_INPUT</b> (incoming data) or <b>wxSOCKET_LOST</b> (connection closed at the remote end) events. In the sample, the event handler is the same for all connections; to find out which socket the event is addressed to, the GetSocket function is used.</p>
<p>Although it might take some time to get used to the event-oriented system upon which wxSocket is built, the benefits are many. See, for example, that the server application, while being single-threaded (and of course without using fork() or ugly select() loops) can handle an arbitrary number of connections.</p>
<p>The client starts up unconnected, so you can use the Connect... option to specify the address of the server you are going to connect to (the TCP port number is hard-coded as 3000). Once connected, a number of tests are possible. Currently, three tests are implemented. They show how to use the basic IO calls in <a class="el" href="classwx_socket_base.html" title="wxSocketBase is the base class for all socket-related objects, and it defines all basic IO functional...">wxSocketBase</a>, such as <a class="el" href="classwx_socket_base.html#aa75b3c2dd051a012cfbd0596d95f80c2" title="Read up to the given number of bytes from the socket.">wxSocketBase::Read()</a>, <a class="el" href="classwx_socket_base.html#a7676f1821d2e17db95de2438346355cd" title="Write up to the given number of bytes to the socket.">wxSocketBase::Write()</a>, <a class="el" href="classwx_socket_base.html#a7c16b20282272c68acfe04107d430bf6" title="Receive a message sent by WriteMsg().">wxSocketBase::ReadMsg()</a> and <a class="el" href="classwx_socket_base.html#a91abca66c1d5bf4237aa87b0e796464b" title="Sends a buffer which can be read using ReadMsg().">wxSocketBase::WriteMsg()</a>, and how to set up the correct IO flags depending on what you are going to do. See the comments in the code for more information. Note that because both clients and connection objects in the server set up an event handler to catch <b>wxSOCKET_LOST</b> events, each one is immediately notified if the other end closes the connection.</p>
<p>There is also a URL test which shows how to use the <a class="el" href="classwx_u_r_l.html" title="wxURL is a specialization of wxURI for parsing URLs.">wxURL</a> class to fetch data from a given URL.</p>
<p>The sockets sample is work in progress. Some things to do:</p>
<ul>
<li>More tests for basic socket functionality. </li>
<li>More tests for protocol classes (<a class="el" href="classwx_protocol.html" title="Represents a protocol for use with wxURL.">wxProtocol</a> and its descendants). </li>
<li>Tests for the recently added (and still in alpha stage) datagram sockets. </li>
<li>New samples which actually do something useful (suggestions accepted).</li>
</ul>
<p><em>Location:</em> <code>samples/sockets</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/sockets">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/sockets</a></p>
<h1><a class="anchor" id="page_samples_sound"></a>
Sound Sample</h1>
<p>The <code>sound</code> sample shows how to use <a class="el" href="classwx_sound.html" title="This class represents a short sound (loaded from Windows WAV file), that can be stored in memory and ...">wxSound</a> for simple audio output (e.g. notifications).</p>
<p><em>Location:</em> <code>samples/sound</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/sound">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/sound</a></p>
<h1><a class="anchor" id="page_samples_splash"></a>
Splash Screen Sample</h1>
<p>This sample demonstrates <a class="el" href="classwx_splash_screen.html" title="wxSplashScreen shows a window with a thin border, displaying a bitmap describing your application...">wxSplashScreen</a>.</p>
<p><em>Location:</em> <code>samples/splash</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/splash">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/splash</a></p>
<h1><a class="anchor" id="page_samples_splitter"></a>
Splitter Window Sample</h1>
<p>This sample demonstrates <a class="el" href="classwx_splitter_window.html" title="This class manages up to two subwindows.">wxSplitterWindow</a>.</p>
<p><em>Location:</em> <code>samples/splitter</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/splitter">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/splitter</a></p>
<h1><a class="anchor" id="page_samples_statbar"></a>
Status Bar Sample</h1>
<p>This sample shows how to create and use <a class="el" href="classwx_status_bar.html" title="A status bar is a narrow window that can be placed along the bottom of a frame to give small amounts ...">wxStatusBar</a>. Although most of the samples have a statusbar, they usually only create a default one and only do it once.</p>
<p>Here you can see how to recreate the statusbar (with possibly different number of fields) and how to use it to show icons/bitmaps and/or put arbitrary controls into it.</p>
<p><em>Location:</em> <code>samples/statbar</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/statbar">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/statbar</a></p>
<h1><a class="anchor" id="page_samples_stc"></a>
wxStyledTextCtrl Sample</h1>
<p>This sample demonstrates <a class="el" href="classwx_styled_text_ctrl.html" title="A wxWidgets implementation of the Scintilla source code editing component.">wxStyledTextCtrl</a>.</p>
<p><em>Location:</em> <code>samples/stc</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/stc">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/stc</a></p>
<h1><a class="anchor" id="page_samples_svg"></a>
SVG Sample</h1>
<p>This sample demonstrates <a class="el" href="classwx_s_v_g_file_d_c.html" title="A wxSVGFileDC is a device context onto which graphics and text can be drawn, and the output produced ...">wxSVGFileDC</a>.</p>
<p><em>Location:</em> <code>samples/svg</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/svg">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/svg</a></p>
<h1><a class="anchor" id="page_samples_taborder"></a>
Tab Order Sample</h1>
<p>This sample allows to test keyboard navigation (mostly done using the <code>TAB</code> key, hence the sample name) between different controls. It shows the use of <a class="el" href="classwx_window.html#af2b92f61cd9f9e2e0efe4cce307e25b1" title="Same as MoveAfterInTabOrder() except that it inserts this window just before win instead of putting i...">wxWindow::MoveBeforeInTabOrder()</a> and MoveAfterInTabOrder() methods to change the default order of the windows in the navigation chain and of <a class="el" href="classwx_window.html#a86904f6785df4af6036b33383490a805" title="Performs a keyboard navigation action starting from this window.">wxWindow::Navigate()</a> for moving focus along this chain.</p>
<p><em>Location:</em> <code>samples/taborder</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/taborder">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/taborder</a></p>
<h1><a class="anchor" id="page_samples_taskbar"></a>
Task Bar Icon Sample</h1>
<p>This sample demonstrates <a class="el" href="classwx_task_bar_icon.html" title="This class represents a taskbar icon.">wxTaskBarIcon</a>.</p>
<p><em>Location:</em> <code>samples/taskbar</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/taskbar">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/taskbar</a></p>
<h1><a class="anchor" id="page_samples_text"></a>
Text Sample</h1>
<p>This sample demonstrates four features: firstly the use and many variants of the <a class="el" href="classwx_text_ctrl.html" title="A text control allows text to be displayed and edited.">wxTextCtrl</a> class (single line, multi line, read only, password, ignoring TAB, ignoring ENTER).</p>
<p>Secondly it shows how to intercept a <a class="el" href="classwx_key_event.html" title="This event class contains information about key press and release events.">wxKeyEvent</a> in both the raw form using the <code>EVT_KEY_UP</code> and <code>EVT_KEY_DOWN</code> macros and the higher level from using the <code>EVT_CHAR</code> macro. All characters will be logged in a log window at the bottom of the main window. By pressing some of the function keys, you can test some actions in the text ctrl as well as get statistics on the text ctrls, which is useful for testing if these statistics actually are correct.</p>
<p>Thirdly, on platforms which support it, the sample will offer to copy text to the <a class="el" href="classwx_clipboard.html" title="A class for manipulating the clipboard.">wxClipboard</a> and to paste text from it. The GTK version will use the so called PRIMARY SELECTION, which is the pseudo clipboard under X and best known from pasting text to the XTerm program.</p>
<p>Last but not least: some of the text controls have tooltips and the sample also shows how tooltips can be centrally disabled and their latency controlled.</p>
<p><em>Location:</em> <code>samples/text</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/text">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/text</a></p>
<h1><a class="anchor" id="page_samples_thread"></a>
Thread Sample</h1>
<p>This sample demonstrates use of threads in connection with GUI programs.</p>
<p>There are two fundamentally different ways to use threads in GUI programs and either way has to take care of the fact that the GUI library itself usually is not multi-threading safe, i.e. that it might crash if two threads try to access the GUI class simultaneously.</p>
<p>One way to prevent that is have a normal GUI program in the main thread and some worker threads which work in the background. In order to make communication between the main thread and the worker threads possible, wxWidgets offers the <a class="el" href="group__group__funcmacro__events.html#gae921d7bd0e52fedbf3f253d2c408bce1" title="Queue an event for processing on the given object.">wxQueueEvent</a> function and this sample demonstrates its usage.</p>
<p>The other way is to use a <a class="el" href="group__group__funcmacro__thread.html#ga6671c1599fd4ccf6a7c7bb90b2304709" title="This function must be called when any thread other than the main GUI thread wants to get access to th...">wxMutexGuiEnter</a> and <a class="el" href="group__group__funcmacro__thread.html#gaddfdb2956953480a379d998ea7ced5b5" title="This function is only defined on platforms which support preemptive threads.">wxMutexGuiLeave</a> functions, but this is not currently shown in the sample.</p>
<p>See also <a class="el" href="overview_thread.html">Multithreading Overview</a> and <a class="el" href="classwx_thread.html" title="A thread is basically a path of execution through a program.">wxThread</a>.</p>
<p><em>Location:</em> <code>samples/thread</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/thread">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/thread</a></p>
<h1><a class="anchor" id="page_samples_toolbar"></a>
Tool Bar Sample</h1>
<p>The toolbar sample shows the <a class="el" href="classwx_tool_bar.html" title="A toolbar is a bar of buttons and/or other controls usually placed below the menu bar in a wxFrame...">wxToolBar</a> class in action.</p>
<p>The following things are demonstrated:</p>
<ul>
<li>Creating the toolbar using <a class="el" href="classwx_tool_bar.html#acd25fec352f66fb174f7f81a7d834b21" title="Adds a tool to the toolbar.">wxToolBar::AddTool()</a> and <a class="el" href="classwx_tool_bar.html#aec263a8e47372eb78e91b8db8797731d" title="Adds any control to the toolbar, typically e.g. a wxComboBox.">wxToolBar::AddControl()</a>: see MyApp::InitToolbar() in the sample. </li>
<li>Using <code>EVT_UPDATE_UI</code> handler for automatically enabling/disabling toolbar buttons without having to explicitly call EnableTool. This is done in MyFrame::OnUpdateCopyAndCut(). </li>
<li>Using <a class="el" href="classwx_tool_bar.html#aea3c91f9b3d7505e4b511f678883c73d" title="Removes the specified tool from the toolbar and deletes it.">wxToolBar::DeleteTool()</a> and <a class="el" href="classwx_tool_bar.html#a584c791a0108fd848c9cd1e997316ad3" title="Inserts the tool with the specified attributes into the toolbar at the given position.">wxToolBar::InsertTool()</a> to dynamically update the toolbar.</li>
</ul>
<p>Some buttons in the main toolbar are check buttons, i.e. they stay checked when pressed. On the platforms which support it, the sample also adds a combobox to the toolbar showing how you can use arbitrary controls and not only buttons in it.</p>
<p>If you toggle another toolbar in the sample (using <code>Ctrl-A</code>) you will also see the radio toolbar buttons in action: the first three buttons form a radio group, i.e. checking any of them automatically unchecks the previously checked one.</p>
<p><em>Location:</em> <code>samples/toolbar</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/toolbar">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/toolbar</a></p>
<h1><a class="anchor" id="page_samples_treectrl"></a>
wxTreeCtrl Sample</h1>
<p>This sample demonstrates using the <a class="el" href="classwx_tree_ctrl.html" title="A tree control presents information as a hierarchy, with items that may be expanded to show further i...">wxTreeCtrl</a> class. Here you may see how to process various notification messages sent by this control and also when they occur (by looking at the messages in the text control in the bottom part of the frame).</p>
<p>Adding, inserting and deleting items and branches from the tree as well as sorting (in default alphabetical order as well as in custom one) is demonstrated here as well - try the corresponding menu entries.</p>
<p><em>Location:</em> <code>samples/treectrl</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/treectrl">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/treectrl</a></p>
<h1><a class="anchor" id="page_samples_typetest"></a>
Types Sample</h1>
<p>This sample demonstrates wxWidgets types.</p>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000002">Todo:</a></b></dt><dd>This sample isn't very didactive; it's more than a set of tests rather than a sample and thus should be rewritten with CppUnit and moved under "tests"</dd></dl>
<p><em>Location:</em> <code>samples/typetest</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/typetest">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/typetest</a></p>
<h1><a class="anchor" id="page_samples_uiaction"></a>
wxUIActionSimulator Sample</h1>
<p>This sample demonstrates <a class="el" href="classwx_u_i_action_simulator.html" title="wxUIActionSimulator is a class used to simulate user interface actions such as a mouse click or a key...">wxUIActionSimulator</a>.</p>
<p>This sample shows some features of <a class="el" href="classwx_u_i_action_simulator.html" title="wxUIActionSimulator is a class used to simulate user interface actions such as a mouse click or a key...">wxUIActionSimulator</a> class. When a simulation is run using its menu items, you can see that the button is pressed programmatically and the characters generated by the program appear in the text control.</p>
<p><em>Location:</em> <code>samples/uiaction</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/uiaction">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/uiaction</a></p>
<h1><a class="anchor" id="page_samples_validate"></a>
Validator Sample</h1>
<p>This sample demonstrates <a class="el" href="classwx_validator.html" title="wxValidator is the base class for a family of validator classes that mediate between a class of contr...">wxValidator</a>.</p>
<p><em>Location:</em> <code>samples/validate</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/validate">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/validate</a></p>
<h1><a class="anchor" id="page_samples_vscroll"></a>
VScrolled Window Sample</h1>
<p>This sample demonstrates <a class="el" href="classwx_v_scrolled_window.html" title="In the name of this class, "V" may stand for "variable" because it can be used for scrolling rows of ...">wxVScrolledWindow</a>.</p>
<p><em>Location:</em> <code>samples/vscroll</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/vscroll">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/vscroll</a></p>
<h1><a class="anchor" id="page_samples_webview"></a>
wxWebView Sample</h1>
<p>The <a class="el" href="classwx_web_view.html" title="This control may be used to render web (HTML / CSS / javascript) documents.">wxWebView</a> sample demonstarates the various capabilities of the <a class="el" href="classwx_web_view.html" title="This control may be used to render web (HTML / CSS / javascript) documents.">wxWebView</a> control. It is set up as a simple single window web browser, but with support for many of the more complex <a class="el" href="classwx_web_view.html" title="This control may be used to render web (HTML / CSS / javascript) documents.">wxWebView</a> features, including browsing through archives.</p>
<p><em>Location:</em> <code>samples/webview</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/webview">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/webview</a></p>
<h1><a class="anchor" id="page_samples_widgets"></a>
Widgets Sample</h1>
<p>The widgets sample is the main presentation program for most simple and advanced native controls and complex generic widgets provided by wxWidgets. The sample tests their basic functionality, events, placement, modification in terms of colour and font as well as the possibility to change the controls programmatically, such as adding an item to a list box etc. All widgets are categorized for easy browsing.</p>
<p><em>Location:</em> <code>samples/widgets</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/widgets">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/widgets</a></p>
<h1><a class="anchor" id="page_samples_wizard"></a>
Wizard Sample</h1>
<p>This sample shows the so-called wizard dialog (implemented using <a class="el" href="classwx_wizard.html" title="wxWizard is the central class for implementing 'wizard-like' dialogs.">wxWizard</a> and related classes). It shows almost all features supported:</p>
<ul>
<li>Using bitmaps with the wizard and changing them depending on the page shown (notice that wxValidationPage in the sample has a different image from the other ones) </li>
<li>Using TransferDataFromWindow to verify that the data entered is correct before passing to the next page (done in wxValidationPage which forces the user to check a checkbox before continuing). </li>
<li>Using more elaborated techniques to allow returning to the previous page, but not continuing to the next one or vice versa (in wxRadioboxPage) </li>
<li>This (wxRadioboxPage) page also shows how the page may process the <em>Cancel</em> button itself instead of relying on the wizard parent to do it. </li>
<li>Normally, the order of the pages in the wizard is known at compile-time, but sometimes it depends on the user choices: wxCheckboxPage shows how to dynamically decide which page to display next (see also <a class="el" href="classwx_wizard_page.html" title="wxWizardPage is one of the screens in wxWizard: it must know what are the following and preceding pag...">wxWizardPage</a>)</li>
</ul>
<p><em>Location:</em> <code>samples/wizard</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/wizard">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/wizard</a></p>
<h1><a class="anchor" id="page_samples_wrapsizer"></a>
wxWrapSizer Sample</h1>
<p>This sample demonstrates <a class="el" href="classwx_wrap_sizer.html" title="A wrap sizer lays out its items in a single line, like a box sizer – as long as there is space availa...">wxWrapSizer</a>.</p>
<p><em>Location:</em> <code>samples/wrapsizer</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/wrapsizer">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/wrapsizer</a></p>
<h1><a class="anchor" id="page_samples_xrc"></a>
XRC Sample</h1>
<p>This sample shows how to use the various features of the <a class="el" href="overview_xrc.html">XML Based Resource System (XRC)</a> to create the gui of your program. It starts by loading and showing a frame and other resources. From its menu or toolbar you can then run the following dialogs:</p>
<ul>
<li>A non-derived <a class="el" href="classwx_dialog.html" title="A dialog box is a window with a title bar and sometimes a system menu, which can be moved around the ...">wxDialog</a> </li>
<li>A derived dialog </li>
<li>A dialog containing a large number of controls </li>
<li>An uncentred dialog </li>
<li>A dialog demonstrating the use of object references and ID ranges </li>
<li>A dialog that contains a custom class </li>
<li>A dialog with platform-specific features </li>
<li>A dialog demonstrating <a class="el" href="classwx_art_provider.html" title="wxArtProvider class is used to customize the look of wxWidgets application.">wxArtProvider</a> </li>
<li>A dialog saying "VARIABLE EXPANSION ISN'T IMPLEMENTED CURRENTLY" :/</li>
</ul>
<p><em>Location:</em> <code>samples/xrc</code> subdirectory of your wxWidgets installation or <a href="http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/xrc">http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/xrc</a> </p>
</div></div><!-- contents -->
<address class="footer">
<small>
Generated on Thu Nov 27 2014 13:46:42 for wxWidgets by <a href="http://www.doxygen.org/index.html" target="_new">Doxygen</a> 1.8.2
</small>
</address>
<script src="wxwidgets.js" type="text/javascript"></script>
</div><!-- #page_container -->
</body>
</html>
|