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 |