Protected
keyboardThe helper for handling enter key presses
Protected
pointerThe helper for handling pointer clicks
Private
widgetThe widget that will be auto-scrolled when keyboard focused
The current click state
See clickStateChanged.
Note that this does not check if the combined state has changed, it only check if any of the states in clickHelpers has changed, meaning that this can be true while clickState is equal to lastClickState. To check whether the combined state changed, compare the aforementioned values. This is the default behaviour so that clicks aren't dropped.
Last click state
Similar to wasClick, except that the wasClick property for each click helper is only true if the clickStateChanged property is also true.
Handle event from handleEvent. Does most of the button logic.
Returns a 2-tuple containing, respective, whether a click occurred, and whether the event should be captured
The event from handleEvent
The root from handleEvent
Is the button being clicked enabled? If not, then the click state will remain unchanged, but the event will be captured
The bounding box to be used for detecting pointer clicks
Handle focus dropping from onFocusDropped. If keyboard focus is dropped, then the button is released via the keyboardClickHelper click helper
Returns true if the focus type was the keyboard focus (and therefore the button probably needs to be re-painted)
The focus type from onFocusDropped
Handle focus grabbing from onFocusGrabbed. If keyboard focus is gained, then the button is hovered via the keyboardClickHelper click helper
Returns true if the focus type was the keyboard focus (and therefore the button probably needs to be re-painted)
The focus type from onFocusGrabbed
Generated using TypeDoc
A CompoundClickHelper specialised for Button-like widgets. Handles pointer clicks and enter key-presses if the widget has a keyboard focus.
GenericClickHelper methods are still available, however, calls to the new methods provided by this class are preferrable; mostly they implement Widget methods.