Code structure

Since version 1.50, the files have been split as much as possible into command and platform-specific code. The include and src directories each have a base directory for the common code, plus a directory for each platform, currently msw and x. Because much X functionality is shared, the Motif and XView versions are contained in the same files, separated by conditional compilation statements. This structure should make it easy both to implement support for new platforms, and to edit the existing code.

In order to provide separate out the base functionality from the platform-specific functionality, each wxWindows class is composed of two classes: a base for the common code with prefix wxb, and a derived class for the platform with prefix wx. Base files have a wb_ prefix whilst platform-specific files (or files which never have corresponding platform-specific code) have a wx_ prefix.

For example, the wxCanvas class is declared for each platform, and derives from wxbCanvas. The relevant files for this class may therefore be found as follows:

include\base\wb_canvs.h
include\msw\wx_canvs.h
include\x\wx_canvs.h
src\base\wb_canvs.cc
src\msw\wx_canvs.cc
src\x\wx_canvs.cc
Each wx_ header file includes the corresponding wb_ header file.