m3e/scale_gesture
ScaleGesture is a non-visual element used to detect a scale 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(
for: option.Option(String),
buttons: List(gesture_input_button.GestureInputButton),
pointer_types: List(pointer_type.PointerType),
disabled: Disabled,
priority: Float,
pointers: Float,
distance_threshold: Float,
)
}
Constructors
-
Config( for: option.Option(String), buttons: List(gesture_input_button.GestureInputButton), pointer_types: List(pointer_type.PointerType), disabled: Disabled, priority: Float, pointers: Float, distance_threshold: Float, )
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 that must be pressed before the gesture fails.
- distance_threshold: Minimum distance change (px) required to activate scale.
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 const default_buttons: List(
gesture_input_button.GestureInputButton,
)
pub fn default_config() -> Config
default_config is the default configuration for this component.
pub const default_disabled: Disabled
pub const default_distance_threshold: Float
pub const default_for: option.Option(String)
pub const default_pointer_types: List(pointer_type.PointerType)
pub const default_pointers: Float
pub const default_priority: Float
pub fn disabled(
record: ScaleGesture,
disabled: Disabled,
) -> ScaleGesture
disabled sets the value of disabled for this ScaleGesture.
pub fn distance_threshold(
record: ScaleGesture,
distance_threshold: Float,
) -> ScaleGesture
distance_threshold sets the value of distance_threshold 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 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: Float,
) -> 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