m3e/pan_gesture

PanGesture is a non-visual element used to detect and interpret pan gestures from an input stream //// produced from an attached 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: String,
    pointers: Float,
    activation_mode: pan_gesture_activation_mode.PanGestureActivationMode,
    min_displacement: Float,
    lock_axis: pan_gesture_lock_axis.PanGestureLockAxis,
    axis_threshold: Float,
    delta_threshold: Float,
    max_press_interval: Float,
  )
}

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:

  • 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.
  • pointers: Number of pointers required for the gesture to be recognized.
  • activation_mode: Mode in which to activate the gesture.
  • min_displacement: Minimum distance (px) a pointer can move before the gesture starts.
  • 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 detail for a locked axis.
  • max_press_interval: Maximum allowed time (ms) between the earliest and latest press.
pub opaque type PanGesture

Values

pub fn activation_mode(
  record: PanGesture,
  activation_mode: pan_gesture_activation_mode.PanGestureActivationMode,
) -> PanGesture

activation_mode sets the value of activation_mode 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 fn buttons(
  record: PanGesture,
  buttons: List(gesture_input_button.GestureInputButton),
) -> PanGesture

buttons sets the value of buttons 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_max_press_interval: Float
pub const default_min_displacement: Float
pub const default_pointer_types: List(pointer_type.PointerType)
pub const default_pointers: Float
pub const default_priority: String
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 max_press_interval(
  record: PanGesture,
  max_press_interval: Float,
) -> PanGesture

max_press_interval sets the value of max_press_interval 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 new() -> PanGesture

new creates a new PanGesture with the default configuration.

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

pointer_types sets the value of pointer_types for this PanGesture.

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

pointers sets the value of pointers for this PanGesture.

pub fn priority(
  record: PanGesture,
  priority: String,
) -> 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