m3e/tap_gesture

TapGesture is a non-visual element used to detect a tap 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(
    allowed_buttons: gesture_input_button.GestureInputButton,
    disabled: Disabled,
    priority: Float,
    pointers: Float,
    max_press_interval: Float,
    max_release_interval: Float,
    max_displacement: Float,
    max_duration: Float,
    for: option.Option(String),
  )
}

Constructors

Disabled is whether gesture recognition is disabled.

pub type Disabled {
  IsDisabled
  IsNotDisabled
}

Constructors

  • IsDisabled
  • IsNotDisabled

TapGesture is a View Model for this component

Fields:

  • allowed_buttons: Which buttons can be pressed.
  • disabled: Whether gesture recognition is disabled.
  • priority: The priority in which to recognize gestures.
  • pointers: Number of pointers that must be pressed before the gesture fails.
  • max_press_interval: Maximum time (ms) between tap presses.
  • max_release_interval: Maximum time (ms) between tap releases.
  • max_displacement: Maximum distance (px) a pointer can move before the gesture fails.
  • max_duration: Maximum time (ms) taps can be pressed before the gesture fails.
  • for: The identifier of the interactive control to which this element is attached.
pub opaque type TapGesture

Values

pub fn allowed_buttons(
  record: TapGesture,
  allowed_buttons: gesture_input_button.GestureInputButton,
) -> TapGesture

allowed_buttons sets the value of allowed_buttons for this TapGesture.

pub fn default_config() -> Config

default_config is the default configuration for this component.

pub const default_disabled: Disabled
pub const default_for: option.Option(String)
pub const default_max_displacement: Float
pub const default_max_duration: Float
pub const default_max_press_interval: Float
pub const default_max_release_interval: Float
pub const default_pointers: Float
pub const default_priority: Float
pub fn disabled(
  record: TapGesture,
  disabled: Disabled,
) -> TapGesture

disabled sets the value of disabled for this TapGesture.

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

for sets the value of for for this TapGesture.

pub fn from_config(config: Config) -> TapGesture

from_config creates a new TapGesture from the given configuration.

pub fn max_displacement(
  record: TapGesture,
  max_displacement: Float,
) -> TapGesture

max_displacement sets the value of max_displacement for this TapGesture.

pub fn max_duration(
  record: TapGesture,
  max_duration: Float,
) -> TapGesture

max_duration sets the value of max_duration for this TapGesture.

pub fn max_press_interval(
  record: TapGesture,
  max_press_interval: Float,
) -> TapGesture

max_press_interval sets the value of max_press_interval for this TapGesture.

pub fn max_release_interval(
  record: TapGesture,
  max_release_interval: Float,
) -> TapGesture

max_release_interval sets the value of max_release_interval for this TapGesture.

pub fn new() -> TapGesture

new creates a new TapGesture with the default configuration.

pub fn pointers(
  record: TapGesture,
  pointers: Float,
) -> TapGesture

pointers sets the value of pointers for this TapGesture.

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

priority sets the value of priority for this TapGesture.

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

render creates a Lustre Element for a TapGesture

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

render_config creates a Lustre Element from a TapGesture Config

Search Document