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

  • 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)
pub opaque type PointerArea

Values

pub fn a11y(pa: PointerArea, a: a11y.A11y) -> PointerArea

Set accessibility properties for this widget.

pub fn build(pa: PointerArea) -> node.Node

Build the pointer area into a renderable Node.

pub fn cursor(pa: PointerArea, c: Cursor) -> PointerArea

Set the mouse cursor.

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 new(id: String) -> PointerArea

Create a new mouse area builder.

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_move(pa: PointerArea, enabled: Bool) -> PointerArea

Enable the move event.

pub fn on_press(pa: PointerArea, tag: String) -> PointerArea

Set the press event tag.

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 push(pa: PointerArea, child: node.Node) -> PointerArea

Add a child node.

pub fn with_opts(pa: PointerArea, opts: List(Opt)) -> PointerArea

Apply a list of options to a pointer area builder.

Search Document