Class: Toybox.WatchUi.BehaviorDelegate
- Inherits:
-
Toybox.WatchUi.InputDelegate
Overview
BehaviorDelegate handles behavior input events.
A BehaviorDelegate differs from an InputDelegate in that it acts upon device-independent behaviors, such as "next page" and "previous page" instead of device-specific button presses. For example, these behaviors might be mapped to swipe left and swipe right inputs on touch screen devices, while on non-touch screen devices these behaviors might be mapped to physical buttons.
Since BehaviorDelegate extends InputDelegate, so it can also act on basic
inputs as well. If a BehaviorDelegate returns true
for a function
(indicating the input was used) then the InputDelegate function that
corresponds to the behavior will not be called.
See Also:
Instance Method Summary collapse
-
initialize()
Constructor.
-
onBack() as Lang.Boolean
Represents the Back behavior.
-
onMenu() as Lang.Boolean
Represents the Menu behavior.
-
onNextMode() as Lang.Boolean
Represents the Next behavior.
-
onNextPage() as Lang.Boolean
Represents the Next Page behavior.
-
onPreviousMode() as Lang.Boolean
Represents the Previous Mode behavior.
-
onPreviousPage() as Lang.Boolean
Represents the Previous Page behavior.
-
onSelect() as Lang.Boolean
Represents the Selection behavior.
Instance Method Details
initialize()
Constructor
onBack() as Lang.Boolean
Represents the Back behavior.
This is typically triggered by the back button (KEY_ESC).
onMenu() as Lang.Boolean
Represents the Menu behavior.
This is typically triggered by the menu button (KEY_MENU).
onNextMode() as Lang.Boolean
Represents the Next behavior.
onNextPage() as Lang.Boolean
Represents the Next Page behavior.
This is typically triggered by the down button (KEY_DOWN) or by a SWIPE_UP SwipeEvent on a touch screen.
onPreviousMode() as Lang.Boolean
Represents the Previous Mode behavior.
onPreviousPage() as Lang.Boolean
Represents the Previous Page behavior.
This is typically triggered by the up button (KEY_UP) or by a SWIPE_DOWN SwipeEvent on a touch screen.
onSelect() as Lang.Boolean
Represents the Selection behavior.
This is typically triggered by the Start/Enter button (KEY_ENTER) or by a CLICK_TYPE_TAP ClickEvent on a touch screen.