plushie/widget/pointer_area
Pointer area widget builder (pointer interaction wrapper).
Captures all pointer input (mouse, touch, pen) within a region.
Types
pub type Cursor {
Pointer
Grab
Grabbing
Crosshair
CursorText
CursorMove
NotAllowed
Progress
Wait
Help
Cell
Copy
CursorAlias
NoDrop
AllScroll
ZoomIn
ZoomOut
ContextMenu
ResizingHorizontally
ResizingVertically
ResizingDiagonallyUp
ResizingDiagonallyDown
ResizingColumn
ResizingRow
}
Constructors
-
Pointer -
Grab -
Grabbing -
Crosshair -
CursorText -
CursorMove -
NotAllowed -
Progress -
Wait -
Help -
Cell -
Copy -
CursorAlias -
NoDrop -
AllScroll -
ZoomIn -
ZoomOut -
ContextMenu -
ResizingHorizontally -
ResizingVertically -
ResizingDiagonallyUp -
ResizingDiagonallyDown -
ResizingColumn -
ResizingRow
Option type for mouse area properties.
pub type Opt {
Cursor(Cursor)
OnPress(String)
OnRelease(String)
OnRightPress(Bool)
OnRightRelease(Bool)
OnMiddlePress(Bool)
OnMiddleRelease(Bool)
OnDoubleClick(Bool)
OnEnter(Bool)
OnExit(Bool)
OnMove(Bool)
OnScroll(Bool)
EventRate(Int)
A11y(a11y.A11y)
}
Constructors
pub opaque type PointerArea
Values
pub fn a11y(pa: PointerArea, a: a11y.A11y) -> PointerArea
Set accessibility properties for this widget.
pub fn event_rate(pa: PointerArea, rate: Int) -> PointerArea
Set the event throttle rate in milliseconds.
pub fn extend(
pa: PointerArea,
children: List(node.Node),
) -> PointerArea
Add multiple child nodes.
pub fn on_double_click(
pa: PointerArea,
enabled: Bool,
) -> PointerArea
Enable the double-click event.
pub fn on_enter(pa: PointerArea, enabled: Bool) -> PointerArea
Enable the mouse-enter event.
pub fn on_exit(pa: PointerArea, enabled: Bool) -> PointerArea
Enable the mouse-exit event.
pub fn on_middle_press(
pa: PointerArea,
enabled: Bool,
) -> PointerArea
Enable the middle-click press event.
pub fn on_middle_release(
pa: PointerArea,
enabled: Bool,
) -> PointerArea
Enable the middle-click release event.
pub fn on_release(pa: PointerArea, tag: String) -> PointerArea
Set the release event tag.
pub fn on_right_press(
pa: PointerArea,
enabled: Bool,
) -> PointerArea
Enable the right-click press event.
pub fn on_right_release(
pa: PointerArea,
enabled: Bool,
) -> PointerArea
Enable the right-click release event.
pub fn on_scroll(pa: PointerArea, enabled: Bool) -> PointerArea
Enable the scroll event.
pub fn with_opts(pa: PointerArea, opts: List(Opt)) -> PointerArea
Apply a list of options to a pointer area builder.