Action control states

A standard set of action sending control states is provided so that controls can be constructed to generate actions without having to write any control state derived classes. All the actions that these control states generate then travel up the view hierarchy, making it possible to put one view at the top that responds to all these actions. Special action control states are also provided for menu items that generate actions that walk up a menu hierarchy. The Taligent UI Builder allows you to plug in action control states when building a user interface.

These control states have their own derived classes of TViewAction that provide more information about the state of the control. Specialized action handler mixins are also provided so that a given action handler class can narrow down which actions it is interested in receiving. Note that you can handle any TViewAction derived class by mixing in MViewActionHandler.

Table 1 shows the which action states to use in which controls, the type of actions that each state generates, and the specific action handler class that handles that type of action.


Actions, action states, and action handlers.
TPushButton TMomentaryAction-ControlState TViewAction MViewActionHandler
TMomentaryMenuItem TMomentaryMenu-ActionControlState TMenuAction MMenuActionHandler
TCheckBox, TRadioButton, TToggleButton TBooleanActionState TBooleanControlAction MBooleanControlAction-Handler
TBooleanMenuItem TBooleanMenuAction-ControlState TBooleanMenuAction MBooleanMenuActionHandler
TLineSlider TFloatActionState TFloatControlAction MFloatControlActionHandler
TTextControl TTextActionControlState TTextControlAction MTextControlActionHandler


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker