m3e/long_press_gesture

LongPressGesture is a non-visual element used to detect a long-press 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,
    max_displacement: Float,
    min_duration: Float,
    for: option.Option(String),
  )
}

Constructors

Disabled is whether gesture recognition is disabled.

pub type Disabled {
  IsDisabled
  IsNotDisabled
}

Constructors

  • IsDisabled
  • IsNotDisabled

LongPressGesture 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.
  • max_displacement: Maximum distance (px) a pointer can move before the gesture fails.
  • min_duration: Minimum time (ms) a pointer must remain pressed.
  • for: The identifier of the interactive control to which this element is attached.
pub opaque type LongPressGesture

Values

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

allowed_buttons sets the value of allowed_buttons for this LongPressGesture.

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_min_duration: Float
pub const default_priority: Float
pub fn disabled(
  record: LongPressGesture,
  disabled: Disabled,
) -> LongPressGesture

disabled sets the value of disabled for this LongPressGesture.

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

for sets the value of for for this LongPressGesture.

pub fn from_config(config: Config) -> LongPressGesture

from_config creates a new LongPressGesture from the given configuration.

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

max_displacement sets the value of max_displacement for this LongPressGesture.

pub fn min_duration(
  record: LongPressGesture,
  min_duration: Float,
) -> LongPressGesture

min_duration sets the value of min_duration for this LongPressGesture.

pub fn new() -> LongPressGesture

new creates a new LongPressGesture with the default configuration.

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

priority sets the value of priority for this LongPressGesture.

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

render creates a Lustre Element for a LongPressGesture

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

render_config creates a Lustre Element from a LongPressGesture Config

Search Document