Cross-Platform GUI Programming with wxWidgets

In this chapter, you have learned how to draw on device contexts and use the wxWidgets printing framework, and you received a quick introduction to wxGLCanvas. You can look at the following source code in your wxWidgets distribution for examples of drawing and printing code:

  • samples/drawing

  • samples/font

  • samples/erase

  • samples/image

  • samples/scroll

  • samples/printing

  • src/html/htmprint.cpp

  • demos/bombs

  • demos/fractal

  • demos/life

For advanced 2D drawing applications, you might want to consider the wxArt2D library, which offers loading and saving of graphical objects using SVG files (Scalable Vector Graphics), flicker-free updating, gradients, vector paths, and more. See Appendix E, "Third-Party Tools for wxWidgets," for where to get wxArt2D.

Next, we'll look at how your application can respond to mouse, keyboard, and joystick input.

    Категории