m3e/pan_gesture

PanGesture is a non-visual element used to detect a pan 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,
    min_displacement: Float,
    min_duration: String,
    lock_axis: pan_gesture_lock_axis.PanGestureLockAxis,
    axis_threshold: Float,
    delta_threshold: Float,
    for: option.Option(String),
  )
}

Constructors

Disabled is whether gesture recognition is disabled.

pub type Disabled {
  IsDisabled
  IsNotDisabled
}

Constructors

  • IsDisabled
  • IsNotDisabled

PanGesture 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.
  • min_displacement: Minimum distance (px) a pointer can move before the gesture starts.
  • min_duration: Minimum time (ms) a pointer must remain pressed.
  • lock_axis: Locks movement to an axis.
  • axis_threshold: Minimum total displacement (px) required before axis locking resolves orientation.
  • delta_threshold: Minimum incremental movement (px) on the secondary axis required before emitting move updates.
  • for: The identifier of the interactive control to which this element is attached.
pub opaque type PanGesture

Values

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

allowed_buttons sets the value of allowed_buttons for this PanGesture.

pub fn axis_threshold(
  record: PanGesture,
  axis_threshold: Float,
) -> PanGesture

axis_threshold sets the value of axis_threshold for this PanGesture.

pub const default_axis_threshold: Float
pub fn default_config() -> Config

default_config is the default configuration for this component.

pub const default_delta_threshold: Float
pub const default_disabled: Disabled
pub const default_for: option.Option(String)
pub const default_min_displacement: Float
pub const default_min_duration: String
pub const default_priority: Float
pub fn delta_threshold(
  record: PanGesture,
  delta_threshold: Float,
) -> PanGesture

delta_threshold sets the value of delta_threshold for this PanGesture.

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

disabled sets the value of disabled for this PanGesture.

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

for sets the value of for for this PanGesture.

pub fn from_config(config: Config) -> PanGesture

from_config creates a new PanGesture from the given configuration.

pub fn lock_axis(
  record: PanGesture,
  lock_axis: pan_gesture_lock_axis.PanGestureLockAxis,
) -> PanGesture

lock_axis sets the value of lock_axis for this PanGesture.

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

min_displacement sets the value of min_displacement for this PanGesture.

pub fn min_duration(
  record: PanGesture,
  min_duration: String,
) -> PanGesture

min_duration sets the value of min_duration for this PanGesture.

pub fn new() -> PanGesture

new creates a new PanGesture with the default configuration.

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

priority sets the value of priority for this PanGesture.

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

render creates a Lustre Element for a PanGesture

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

render_config creates a Lustre Element from a PanGesture Config

Search Document