Class: Toybox::WatchUi::InputDelegate
InputDelegate handles basic input events. There are three types of basic inputs: key, touch, and swipe.
サブクラス
関数(要約)
- (Object) handleEvent(evt) : This is the function that maps low level events to delegate events.
- (Boolean) onHold(evt) : When a screen hold event occurs, onHold() is called.
- (Boolean) onKey(evt) : When a hard key is pressed, onKey() is called.
- (Boolean) onKeyPressed(evt) : When a hard key is pressed down, onKeyPressed() is called.
- (Boolean) onKeyReleased(evt) : When a hard key is released, onKeyReleased() is called.
- (Boolean) onRelease(evt) : When a screen release event occurs, onRelease() is called.
- (Boolean) onSwipe(evt) : When a swipe event occurs, onSwipe() is called.
- (Boolean) onTap(evt) : When a screen tap event occurs, onTap() is called.
Instance Method Details
(Object) handleEvent(evt)
This is the function that maps low level events to delegate events. DO NOT OVERRIDE.
(Boolean) onHold(evt)
When a screen hold event occurs, onHold() is called. This is sent if user touches and holds on the screen.
- Parameters
- evt (ClickEvent) : A ClickEvent object containing information about the hold
- Returns : (Boolean) true if handled, false otherwise
- Since : 1.0.0
(Boolean) onKey(evt) : 物理キーが押された時に呼び出される
- Parameters
- evt (KeyEvent) : 発生したキーイベント。WatchUi.KEY_* の値を getKey() を使って取り出せる。
- Returns : (Boolean) true if handled, false otherwise
- Since : 1.0.0
(Boolean) onKeyPressed(evt) : 物理キーが押し込まれた時に呼び出される
- Parameters
- evt (KeyEvent) : The KeyEvent that occured. Call evt.getKey() to get the WatchUi.KEY_* enum value.
- Returns : (Boolean) true if handled, false otherwise
- Since : 1.1.2
(Boolean) onKeyReleased(evt) : 物理キーが離された時に呼び出される
- Parameters
- evt (KeyEvent) : The KeyEvent that occured. Call evt.getKey() to get the WatchUi.KEY_* enum value.
- Returns : (Boolean) true if handled, false otherwise
- Since : 1.1.2
(Boolean) onRelease(evt)
When a screen release event occurs, onRelease() is called. This is only sent after an onHold event when the user stops touching the screen.
- Parameters
- evt (ClickEvent) : A ClickEvent object containing information about the release
- Returns : (Boolean) true if handled, false otherwise
- Since : 1.0.0
(Boolean) onSwipe(evt)
When a swipe event occurs, onSwipe() is called. This is sent when the user swipes the screen.
- Parameters
- evt (SwipeEvent) : A SwipeEvent object containing information about the swipe
- Returns : (Boolean) true if handled, false otherwise
- Since : 1.0.0
(Boolean) onTap(evt)
When a screen tap event occurs, onTap() is called. This is sent if the user taps (quickly presses and releases) the screen.
- Parameters
- evt (ClickEvent) : A ClickEvent object containing information about the tap
- Returns : (Boolean) true if handled, false otherwise
- Since : 1.0.0
最終更新:2016年03月02日 23:53