module Tput::Output::Cursor

Included Modules

Direct including types

Defined in:

tput/output/cursor.cr

Instance Method Summary

Instance Method Detail

def char_pos_absolute(param : Int32 | Nil = 1) #

CSI Pm ` Character Position Absolute [column] (default = [row,1]) (HPA).

TODO switch to adjust_xy


[View source]
def cursor_backward(param = 1) #

CSI Ps A Cursor Up Ps Times (default = 1) (CUU).


[View source]
def cursor_backward_tab(param = 1) #

CSI Ps Z Cursor Backward Tabulation Ps tab stops (default = 1) (CBT).


[View source]
def cursor_char_absolute(point : Point) #

Sets cursor x coordinate to absolute value param.

CSI Ps G
Cursor Character Absolute  [column] (default = [row,1]) (CHA).

[View source]
def cursor_char_absolute(param = 0) #

Sets cursor x coordinate to absolute value param.

CSI Ps G
Cursor Character Absolute  [column] (default = [row,1]) (CHA).

[View source]
def cursor_color(color : String) #

Sets cursor color. XTerm, rxvt, and screen specific.

Accepted values are the color names listed in /etc/X11/rgb.txt.


[View source]
def cursor_color(color : Color) #

Sets cursor color. XTerm, rxvt, and screen specific.

Accepted values are the color names listed in /etc/X11/rgb.txt.


[View source]
def cursor_down(param = 1) #

CSI Ps A Cursor Up Ps Times (default = 1) (CUU).


[View source]
def cursor_forward(param : Int = 1) #

Cursor forward. CSI Ps C Cursor Forward Ps Times (default = 1) (CUF).


[View source]
def cursor_forward_tab(param = 1) #

CSI Ps I Cursor Forward Tabulation Ps tab stops (default = 1) (CHT).


[View source]
def cursor_line_absolute(point : Point) #

Sets cursor y coordinate to absolute value param.

CSI Pm d
Line Position Absolute  [row] (default = [1,column]) (VPA).

NOTE Can't find in terminfo, no idea why it has multiple params (Pm).


[View source]
def cursor_line_absolute(param = 1) #

[View source]
def cursor_next_line(param = 1) #

CSI Ps E Cursor Next Line Ps Times (default = 1) (CNL). same as CSI Ps B ?


[View source]
def cursor_position(row : Int = 0, column : Int = 0) #

Set cursor position. CSI Ps ; Ps H Cursor Position [row;column] (default = [1,1]) (CUP).


[View source]
def cursor_position(point : Tput::Point) #

Set cursor position. CSI Ps ; Ps H Cursor Position [row;column] (default = [1,1]) (CUP).


[View source]
def cursor_preceding_line(param = 1) #

CSI Ps F Cursor Preceding Line Ps Times (default = 1) (CNL). reuse CSI Ps A ?


[View source]
def cursor_shape(shape, blink = false) #

Sets cursor shape.

Only XTerm, (u)rxvt, screen, and iTerm2. Does nothing otherwise. If you know of any others, post them.


[View source]
def cursor_up(param = 1) #

CSI Ps A Cursor Up Ps Times (default = 1) (CUU).


[View source]
def dynamic_cursor_color(param) #

OSC Ps ; Pt ST OSC Ps ; Pt BEL Change dynamic colors


[View source]
def h_position_relative(param = 1) #

141 61 a * HPR - Horizontal Position Relative reuse CSI Ps C ?

TODO switch to adjust_xy; how can we put cuf() without adjusting state?


[View source]
def hide_cursor #

[View source]
def hv_position(row = 0, col = 0) #

CSI Ps ; Ps f Horizontal and Vertical Position [row;column] (default = [1,1]) (HVP).

TODO adjust_xy


[View source]
def lrestore_cursor(key = :local, hide = false) #

Restore Cursor Locally


[View source]
def lsave_cursor(key = :local) #

Save Cursor Locally


[View source]
def move(point : Point) #

Moves cursor to desired point by using absolute coordinate instructions


[View source]
def move(x = nil, y = nil) #

Moves cursor to desired point by using absolute coordinate instructions


[View source]
def omove(point : Point) #

Moves cursor to desired point by using instructions relative to current position

NOTE fix cud and cuu calls


[View source]
def omove(x = 0, y = 0) #

Moves cursor to desired point by using instructions relative to current position

NOTE fix cud and cuu calls


[View source]
def reset_cursor #

[View source]
def reset_cursor_color #

OSC Ps ; Pt ST OSC Ps ; Pt BEL Reset colors


[View source]
def restore_cursor(key : String | Nil = nil, hide : Bool = false) #

Restore saved cursor position.

ESC 8 Restore Cursor (DECRC).


[View source]
def restore_cursor_a #

CSI u Restore cursor (ANSI.SYS).


[View source]
def restore_reported_cursor #

[View source]
def rmove(dx, dy) #

Move cursor by dx columns and dy rows


[View source]
def rmove(point : Point) #

Move cursor by dx columns and dy rows


[View source]
def rsetx(dx) #

Move cursor forward or back by dx columns


[View source]
def rsety(dy) #

Move cursor forward or back by dy rows


[View source]
def save_cursor(key : String | Nil = nil) #

Save cursor position.

ESC 7 Save Cursor (DECSC).


[View source]
def save_cursor_a #

CSI s Save cursor (ANSI.SYS).


[View source]
def set_cursor_style(style = CursorStyle::SteadyBlock) #

CSI Ps SP q Set cursor style (DECSCUSR, VT520). Ps = 0 -> blinking block. Ps = 1 -> blinking block (default). Ps = 2 -> steady block. Ps = 3 -> blinking underline. Ps = 4 -> steady underline.


[View source]
def show_cursor #

[View source]
def v_position_relative(param = 1) #

145 65 e * VPR - Vertical Position Relative reuse CSI Ps B ?

TODO adjust_xy


[View source]