class OneFingerDragRecognizer

Defined at line 25 of file ../../src/ui/a11y/lib/gesture_manager/recognizers_v2/one_finger_drag_recognizer.h

OneFingerDragRecognizer class implements logic to recognize and react to one finger drag

gestures.

Minimal effort is taken towards ignoring 2-finger gestures. For feature parity, while a second

finger is down, events will be suppressed. When it is released, the remaining pointer must be the

original. This requirement should probably be dropped in the future.

Public Members

static const float kMinDragDistanceForUpdate

Public Methods

void OneFingerDragRecognizer (DragGestureCallback on_drag_started, DragGestureCallback on_drag_update, DragGestureCallback on_drag_complete, zx::duration drag_gesture_delay)

on_drag_started: Callback invoked at most once when the recognizer has won the arena. Callback

only occurs if at least one pointer is on the screen.

on_drag_update: Callback invoked as new CHANGE events are handled AFTER the drag gesture is

recognized and has won the arena. Callbacks only occur while exactly one pointer is on the

screen.

on_drag_complete: Callback invoked when the drag gesture is completed (as finger is lifted from

screen, or after this recognizer is awarded the win if this occurs after the gesture has

ended).

drag_gesture_delay: Minimum time a finger can be in contact with the screen to be considered a

drag. Once this delay elapses, the recognizer tries to aggressively accept the gesture in the

arena.

Defined at line 29 of file ../../src/ui/a11y/lib/gesture_manager/recognizers_v2/one_finger_drag_recognizer.cc

void ~OneFingerDragRecognizer ()

Defined at line 38 of file ../../src/ui/a11y/lib/gesture_manager/recognizers_v2/one_finger_drag_recognizer.cc

void HandleEvent (const fuchsia::ui::pointer::augment::TouchEventWithLocalHit & event)

Defined at line 40 of file ../../src/ui/a11y/lib/gesture_manager/recognizers_v2/one_finger_drag_recognizer.cc

void OnWin ()

Defined at line 136 of file ../../src/ui/a11y/lib/gesture_manager/recognizers_v2/one_finger_drag_recognizer.cc

void OnDefeat ()

Defined at line 155 of file ../../src/ui/a11y/lib/gesture_manager/recognizers_v2/one_finger_drag_recognizer.cc

void OnContestStarted (std::unique_ptr<ParticipationTokenInterface> token)

Defined at line 177 of file ../../src/ui/a11y/lib/gesture_manager/recognizers_v2/one_finger_drag_recognizer.cc

std::string DebugName ()

Defined at line 182 of file ../../src/ui/a11y/lib/gesture_manager/recognizers_v2/one_finger_drag_recognizer.cc