struct
Tput::Mouse::Event
- Tput::Mouse::Event
- Struct
- Value
- Object
Overview
A single, normalized mouse event.
#x/#y are 0-based screen coordinates (column, row); the on-the-wire
1-based values have already been adjusted.
Defined in:
tput/mouse.crConstructors
-
.blur(source : Symbol = :xterm) : Event
Constructs a terminal focus-out (
Action::Blur) event. -
.focus(source : Symbol = :xterm) : Event
Constructs a terminal focus-in (
Action::Focus) event. - .new(action : Action, button : Button, x : Int32, y : Int32, shift : Bool = false, meta : Bool = false, ctrl : Bool = false, source : Symbol = :xterm, page : Int32 | Nil = nil, px : Int32 | Nil = nil, py : Int32 | Nil = nil)
Instance Method Summary
- #action : Action
- #action=(action : Action)
- #button : Button
- #button=(button : Button)
- #ctrl=(ctrl : Bool)
- #ctrl? : Bool
-
#focus_event?
Whether this is a focus-gained/lost event rather than a pointer event.
- #meta=(meta : Bool)
- #meta? : Bool
-
#page : Int32 | Nil
Page number, only set by the DEC-locator encoding;
nilotherwise. -
#page=(page : Int32 | Nil)
Page number, only set by the DEC-locator encoding;
nilotherwise. -
#px : Int32 | Nil
Sub-cell pixel coordinates, 0-based, only set by the SGR-Pixels encoding (DEC private mode 1016);
nilfor every other encoding. -
#px=(px : Int32 | Nil)
Sub-cell pixel coordinates, 0-based, only set by the SGR-Pixels encoding (DEC private mode 1016);
nilfor every other encoding. - #py : Int32 | Nil
- #py=(py : Int32 | Nil)
- #shift=(shift : Bool)
- #shift? : Bool
-
#source : Symbol
Where the event originated:
:xtermfor sequences parsed from the input stream, other producers (e.g. -
#source=(source : Symbol)
Where the event originated:
:xtermfor sequences parsed from the input stream, other producers (e.g. - #x : Int32
- #x=(x : Int32)
- #y : Int32
- #y=(y : Int32)
Constructor Detail
Constructs a terminal focus-out (Action::Blur) event.
Constructs a terminal focus-in (Action::Focus) event.
Instance Method Detail
Sub-cell pixel coordinates, 0-based, only set by the SGR-Pixels
encoding (DEC private mode 1016); nil for every other encoding. When
present, #x/#y still carry the derived cell coordinates (pixel ÷ cell
size), so existing cell-based hit-testing is unaffected — a consumer
wanting sub-cell precision (paint/drag over pixel graphics) reads
#px/#py.
Sub-cell pixel coordinates, 0-based, only set by the SGR-Pixels
encoding (DEC private mode 1016); nil for every other encoding. When
present, #x/#y still carry the derived cell coordinates (pixel ÷ cell
size), so existing cell-based hit-testing is unaffected — a consumer
wanting sub-cell precision (paint/drag over pixel graphics) reads
#px/#py.
Where the event originated: :xterm for sequences parsed from the input
stream, other producers (e.g. :gpm) set their own tag. Informational only.
Where the event originated: :xterm for sequences parsed from the input
stream, other producers (e.g. :gpm) set their own tag. Informational only.