Content area
Full text
A C+ + framework for building cross-platform applications
The framework wxWindows is a freely available C++ cross-platform GUI originally created by Julian Smart. wxWindows subscribes to the "write once, build anywhere" ideology-you should be able to compile your program without changing anything under all supported platforms. But wxWindows is much more than just a thin wrapper around GUI controls. It also includes classes for working with various OSdependent services-threads, sockets, high-resolution timers, and more mundane things such as files-in a portable manner. Of course, it also has everything you expect to find in a GUI toolkit, including common controls, common dialogs, document/view classes, support for printing, drag-and-drop, and so on.
wxWindows (available at http://www .wxwindows.org/) currently supports Win32, UNIX/GTK+ (GTK+ is a free toolkit, which is used with X11 and can be used on almost all UNIX workstations, including Linux), and MacOS (both Versions 8 and X). There are also Win16, Motif, and OS/2 ports in progress. Plans for ports to BeOS and QNX have also been announced. wxWindows is free, meaning you don't have to pay any money for using it and, unlike GPL or L-GPL licenses, allows for use in any program under any other license (including commercial programs).
Furthermore, a separate library (wxBase) can be built from the same source tree including only the nonGUI parts of the framework. It contains several datastructure classes (as wxWindows predates STL, it has its own string, list, array, hash table classes, and a powerful wxDateTime class); OS-abstraction classes (wxThread, wxSocket, and wxStopWatch); and utility classes (wxCmdLineParser; wxConfig for working with INI and other configuration files; wxDllLoader for runtime binding; and more). The same classes are available in the full wxWindows library as well, but wxBase is ideal for writing console programs that should run under both Windows and UNIX, be it a socket server or a script to update a database periodically.
A vCard Viewer/Editor Example
In addition to extensive documentation (provided in LaTeX, HTML, PDF, or WinHelp formats), wxWindows includes almost 70 sample programs to illustrate wxWindows features. In this article, I'll present another sample that is useful in its own right. The sample program is a vCard editor. vCards are small ASCII files, usually having a VCF extension with personal information...





