m3e/fling_gesture

FlingGesture is a non-visual element used to detect a fling gesture for an associated element.

This file was generated by m3e/generator

     DO NOT EDIT

Types

Config is a public record for configuring this component.

pub type Config {
  Config(
    for: option.Option(String),
    buttons: List(gesture_input_button.GestureInputButton),
    pointer_types: List(pointer_type.PointerType),
    disabled: Disabled,
    priority: Float,
    min_displacement: Float,
    min_velocity: Float,
    direction_threshold: Float,
    directions: List(
      fling_gesture_direction.FlingGestureDirection,
    ),
  )
}

Constructors

Disabled is whether gesture recognition is disabled.

pub type Disabled {
  IsDisabled
  IsNotDisabled
}

Constructors

  • IsDisabled
  • IsNotDisabled

FlingGesture is a View Model for this component

Fields:

  • for: The identifier of the interactive control to which this element is attached.
  • buttons: Which buttons can be pressed.
  • pointer_types: Which types of pointers can be used to recognize gestures.
  • disabled: Whether gesture recognition is disabled.
  • priority: The priority in which to recognize gestures.
  • min_displacement: * Minimum distance (px) a pointer must move before the gesture can be recognized.
  • min_velocity: Minimum velocity (px/ms) required before the gesture fails.
  • direction_threshold: Minimum displacement (px) required before direction is considered valid.
  • directions: The allowed directions of the fling.
pub opaque type FlingGesture

Values

pub fn buttons(
  record: FlingGesture,
  buttons: List(gesture_input_button.GestureInputButton),
) -> FlingGesture

buttons sets the value of buttons for this FlingGesture.

pub fn default_config() -> Config

default_config is the default configuration for this component.

pub const default_direction_threshold: Float
pub const default_disabled: Disabled
pub const default_for: option.Option(String)
pub const default_min_displacement: Float
pub const default_min_velocity: Float
pub const default_pointer_types: List(pointer_type.PointerType)
pub const default_priority: Float
pub fn direction_threshold(
  record: FlingGesture,
  direction_threshold: Float,
) -> FlingGesture

direction_threshold sets the value of direction_threshold for this FlingGesture.

pub fn directions(
  record: FlingGesture,
  directions: List(fling_gesture_direction.FlingGestureDirection),
) -> FlingGesture

directions sets the value of directions for this FlingGesture.

pub fn disabled(
  record: FlingGesture,
  disabled: Disabled,
) -> FlingGesture

disabled sets the value of disabled for this FlingGesture.

pub fn for(
  record: FlingGesture,
  for: option.Option(String),
) -> FlingGesture

for sets the value of for for this FlingGesture.

pub fn from_config(config: Config) -> FlingGesture

from_config creates a new FlingGesture from the given configuration.

pub fn min_displacement(
  record: FlingGesture,
  min_displacement: Float,
) -> FlingGesture

min_displacement sets the value of min_displacement for this FlingGesture.

pub fn min_velocity(
  record: FlingGesture,
  min_velocity: Float,
) -> FlingGesture

min_velocity sets the value of min_velocity for this FlingGesture.

pub fn new() -> FlingGesture

new creates a new FlingGesture with the default configuration.

pub fn pointer_types(
  record: FlingGesture,
  pointer_types: List(pointer_type.PointerType),
) -> FlingGesture

pointer_types sets the value of pointer_types for this FlingGesture.

pub fn priority(
  record: FlingGesture,
  priority: Float,
) -> FlingGesture

priority sets the value of priority for this FlingGesture.

pub fn render(
  model: FlingGesture,
  attributes: List(attribute.Attribute(msg)),
) -> element.Element(msg)

render creates a Lustre Element for a FlingGesture

pub fn render_config(
  c: Config,
  attributes: List(attribute.Attribute(msg)),
) -> element.Element(msg)

render_config creates a Lustre Element from a FlingGesture Config

Search Document