XP Widgets API


THEORY OF OPERATION AND NOTES

Widgets are persistent view 'objects' for X-Plane. A widget is an object referenced by its opaque handle (widget ID) and the APIs in this file. You cannot access the widget's guts directly. Every Widget has the following intrinsic data:

The Widgets library sends messages to widgets to request specific behaviors or notify the widget of things.

Widgets may have more than one callback function, in which case messages are sent to the most recently added callback function until the message is handled. Messages may also be sent to parents or children; see the XPWidgetDefs.h header file for the different widget message dispatching functions. By adding a callback function to a window you can 'subclass' its behavior.

A set of standard widgets are provided that serve common UI purposes. You can also customize or implement entirely custom widgets.

Widgets are different than other view hierarchies (most notably Win32, which they bear a striking resemblance to) in the following ways: