wxWidgets 1.xx Features

GUI classes

As you would expect, wxWidgets has a range of classes for creating standard windows and controls: for example, wxFrame, wxDialogBox, wxButton, wxListBox, wxGauge, wxChoice, wxText, and so on. Most of these are wrappers around the equivalent native widget; so a wxListBox uses the Motif listbox widget or Windows listbox control. Occasionally additional widget code has been added to the wxWidgets library to support a control, such as the Motif combobox control or the Windows gauge implementation.

A simple toolbar class, wxToolBar, is supplied, and wxButtonBar can be used on Windows to create a native Windows 95 toolbar, with a near-identical API.

wxSplitterWindow allows an application to have two windows with a moveable sash, which when moved completely to one edge triggers code to remove one of the windows, under application control.

wxCanvas allows the user to intercept mouse and keyboard events, and also implements optional scrolling behaviour.

Device contexts

wxWidgets follows the Windows method of associating a device context with a window that is to be drawn into. The drawing code operates via the device context, and therefore by parameterising code by wxDC, you can obtain very portable drawing functions that can draw into a variety of device contexts, such as a wxMemoryDC (for drawing onto a bitmap) or wxPrinterDC (for drawing into a printer).

To draw into a device context, an application normally sets a wxPen (for specifying outline style and colour) and wxBrush (fill colour).

Printing

wxWidgets offers a printing and print previewing framework, which make use of the wxPrinter, wxPrintout and wxPreview classes, internally using wxPostScriptDC or wxPrinterDC for printing on Unix or Windows respectively. wxPostScriptDC can be used directly on Windows or Unix.

Bitmaps

wxBitmap supports a variety of bitmap types, which differs according to platform. XPM is implemented on Unix and Windows; and BMP is implemented on both. wxIcon can load ICO or XPM images from file under Windows, and XBM or XPM files under Unix.

Dialogs

There is a Dialog Editor for wxWidgets to allow interactive positioning of controls. This works somewhat better on Windows than on Unix. As well as loading dialogs from resources, a simple left-to-right, top-to-bottom layout scheme is available for programmatic layout (removed in wxWidgets 2 where more reliance is put on loading dialog resources, and constraint-based layout).

Convenience dialogs are supported, such as wxFileSelector, wxMessageBox, wxColourDialog, wxFontDialog, wxPrintDialog, wxPageSetupDialog.

Operating system functionality

A variety of OS functions are supported, such as wxExecute, wxRemoveFile, wxRenameFile, wxCopyFile, wxFileExists.

Data structures

wxWidgets offers some commonly-used data structure classes: wxList, wxStringList, wxString, wxHashTable.

Online help

wxWidgets applications can support online help, with wxHelpInstance controlling WinHelp under Windows, and wxHelp (a simple help application) under Unix. The supplied utility Tex2RTF can be used to generate your own RTF, WinHelp RTF, HTML, and wxHelp files from Latex source.

Interprocess communication

The classes wxServer, wxClient and wxConnection are used to set up communication between processes; under Windows, DDE is used, and under Unix, TCP/IP is used to simulate the DDE protocol. You can also use the contributed wxSocket library which wraps sockets on Windows and Unix.

Document/view framework

These (optional) classes can help reduce the amount of tedious housekeeping work that an application has to do. An application derives from wxDocument and wxView and specifies the relationship between them. wxWidgets implements default handlers for many behaviours such as file open, close, new, etc. Also included in this framework, but useable independently of it, is a collection of classes for implementing Undo/Redo.

Other classes

As well as the core wxWidgets library, there is a collection of utility classes for implementing tabbed dialogs, grid windows, property dialogs (like Visual Basic property dialogs), structured ASCII text files, tree and graph layout algorithms, and simple hypertext windows.

There are also other contributed classes on the wxWidgets ftp site.

Documentation

A comprehensive reference manual is supplied in HTML, PDF, WinHelp and PostScript formats.

Samples

A set of samples is supplied.


See also: