class
CryTUI::AnsiBackend
- CryTUI::AnsiBackend
- CryTUI::Backend
- Reference
- Object
Overview
ANSI/VT backend for modern terminals. Capability negotiation and raw input are separate concerns; this class owns output state and restoration only.
Defined in:
crytui/ansi_backend.crConstant Summary
-
MOUSE_OFF =
"\e[?1006l\e[?1002l\e[?1000l" -
MOUSE_ON =
"\e[?1000h\e[?1002h\e[?1006h" -
Button-event tracking reports presses, releases, and motion while a button is held, which is what a drag needs; 1006 asks for SGR-encoded coordinates so columns past 223 still report correctly.
Constructors
- .for_terminal(io : IO, size_source : IO::FileDescriptor, alternate_screen = true, mouse = true) : self
- .new(io : IO, width : Int, height : Int, alternate_screen : Bool = true, size_source : IO::FileDescriptor | Nil = nil, mouse : Bool = true)
Instance Method Summary
- #clear : Nil
- #draw(changes : Array(Tuple(Int32, Int32, Cell))) : Nil
- #enter : Nil
- #io : IO
-
#leave : Nil
Mouse tracking is released before the alternate screen, so a terminal that survives the process still stops reporting.
- #refresh_size : Bool
- #resize(width : Int, height : Int)
- #size : Rect
Instance methods inherited from class CryTUI::Backend
clear : Nil
clear,
draw(changes : Array(Tuple(Int32, Int32, Cell))) : Nil
draw,
enter : Nil
enter,
leave : Nil
leave,
refresh_size : Bool
refresh_size,
size : Rect
size
Constructor Detail
def self.for_terminal(io : IO, size_source : IO::FileDescriptor, alternate_screen = true, mouse = true) : self
#
def self.new(io : IO, width : Int, height : Int, alternate_screen : Bool = true, size_source : IO::FileDescriptor | Nil = nil, mouse : Bool = true)
#
Instance Method Detail
def leave : Nil
#
Mouse tracking is released before the alternate screen, so a terminal that survives the process still stops reporting. Leaving it on would spray escape sequences into whatever shell prompt comes back.