Events

In XView and Motif, events (such as resizing, painting, mouse clicks, button presses) are handled by a rather arbitrary collection of optional XView and Xlib callbacks. In Windows 3.1, events are messages which are handled by a window procedure, or ignored.

In wxWindows, an application's GUI objects mostly receive events by wxWindows calling user-overridable handlers, such as OnEvent, OnChar and OnSize. Frames can receive OnClose events from the window manager (X) or system control menu (Windows 3.1). These events are handled by the application by deriving new frame classes and overriding the event-handling member functions.

Panel item notification has to be handled rather differently. In Windows 3.1, all panel item events (such as a button press) are sent to the parent window (requiring large case statements to differentiate the events), and all window events are sent to the relevant window. In XView and Motif, different types of callback function have to be defined, depending on the event.

In wxWindows, panel items have optional callback functions, but there is only one callback type: the function takes the object and a command event structure. The class derivation approach cannot be extended to panel items since it does not make sense to derive a new class for every individual panel item created.

The wxWindows event system