class

Opal::Input::MouseMap

Inherits Reference < Object

Declarative mouse event routing, click handling, and hit-testing DSL.

Instance methods

handle(event : Terminal::MouseEvent) : Bool

Dispatches a MouseEvent to all matching handlers. Returns true if at least one handler processed the event, false otherwise.

Source
on(action : Symbol, button : Terminal::MouseButton | Nil = nil, &block : Terminal::MouseEvent -> Nil) : self

Registers a click handler with optional button constraint (:left, :middle, :right)

Source
on_click(button : Terminal::MouseButton | Nil = nil, &block : Terminal::MouseEvent -> Nil) : self
Source
on_scroll_down
Source
on_scroll_up
Source
zone(x : Range(Int32, Int32), y : Range(Int32, Int32), &block : Terminal::MouseEvent -> Nil) : self

Registers a bounding-box hit test zone (e.g. for buttons, tabs, or cards)

Source

Nested types