m3e/scale_gesture

ScaleGesture is a non-visual element used to detect and interpret scale 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,
    min_displacement: Float,
    max_press_interval: Float,
  )
}

Constructors

Disabled is whether gesture recognition is disabled.

pub type Disabled {
  IsDisabled
  IsNotDisabled
}

Constructors

  • IsDisabled
  • IsNotDisabled

ScaleGesture 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.
  • min_displacement: Minimum distance (px) a pointer must move before the gesture starts.
  • max_press_interval: Maximum allowed time (ms) between the earliest and latest press.
pub opaque type ScaleGesture

Values

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

buttons sets the value of buttons for this ScaleGesture.

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_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 disabled(
  record: ScaleGesture,
  disabled: Disabled,
) -> ScaleGesture

disabled sets the value of disabled for this ScaleGesture.

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

for sets the value of for for this ScaleGesture.

pub fn from_config(config: Config) -> ScaleGesture

from_config creates a new ScaleGesture from the given configuration.

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

max_press_interval sets the value of max_press_interval for this ScaleGesture.

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

min_displacement sets the value of min_displacement for this ScaleGesture.

pub fn new() -> ScaleGesture

new creates a new ScaleGesture with the default configuration.

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

pointer_types sets the value of pointer_types for this ScaleGesture.

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

pointers sets the value of pointers for this ScaleGesture.

pub fn priority(
  record: ScaleGesture,
  priority: String,
) -> ScaleGesture

priority sets the value of priority for this ScaleGesture.

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

render creates a Lustre Element for a ScaleGesture

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

render_config creates a Lustre Element from a ScaleGesture Config

Search Document