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(
for: option.Option(String),
buttons: List(gesture_input_button.GestureInputButton),
pointer_types: List(pointer_type.PointerType),
disabled: Disabled,
priority: Float,
max_displacement: Float,
min_duration: Float,
)
}
Constructors
-
Config( for: option.Option(String), buttons: List(gesture_input_button.GestureInputButton), pointer_types: List(pointer_type.PointerType), disabled: Disabled, priority: Float, max_displacement: Float, min_duration: Float, )
Disabled is whether gesture recognition is disabled.
pub type Disabled {
IsDisabled
IsNotDisabled
}
Constructors
-
IsDisabled -
IsNotDisabled
LongPressGesture 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.
- max_displacement: Maximum distance (px) a pointer can move before the gesture fails.
- min_duration: Minimum time (ms) a pointer must remain pressed.
pub opaque type LongPressGesture
Values
pub fn buttons(
record: LongPressGesture,
buttons: List(gesture_input_button.GestureInputButton),
) -> LongPressGesture
buttons sets the value of buttons for this LongPressGesture.
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_for: option.Option(String)
pub const default_max_displacement: Float
pub const default_min_duration: Float
pub const default_pointer_types: List(pointer_type.PointerType)
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 pointer_types(
record: LongPressGesture,
pointer_types: List(pointer_type.PointerType),
) -> LongPressGesture
pointer_types sets the value of pointer_types for this LongPressGesture.
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