![]() |
• Interface Manager | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
API Links
Developer Links
|
class WidgetDefined in:
The C4Widgets.hWidget class represents a widget in a user interface.
Definition
Member Functions
Constructor
Parameters
Description
The Widget class is the base class for all user interface widgets. It contains information about the widget's identification, the general state of the widget, the widget's transform and size, the type of help balloon attached to the widget, and the list of mutators that may be dynamically animating the widget.Most types of widgets are subclasses of the RenderableWidget class, which is a direct subclass of the Widget class, because it contains additional functionality needed for widgets that are actually displayed. Some kinds of widgets are only containers for other widgets, however, and they are subclassed directly from the Widget class. An instance of the Widget class can act as a group for other widgets by constructing a Widget object with the default kWidgetGeneric specified for the type parameter.When the user interacts with a widget through the mouse or keyboard, the widget receives calls to its Widget::HandleMouseEvent and Widget::HandleKeyboardEvent functions. A widget subclass overrides these functions and handles the events appropriately. When the widget needs to inform and observer that the state of the widget has changed in some way or that the user has activated the widget, it posts a widget event using the Widget::PostWidgetEvent function. Any observer installed by the ExclusiveObservable::SetObserver function then receives the widget event and may take whatever action is necessary.
Base Classes
See Also
Wiki Articles
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||