module Tput::Output
Included Modules
- Crystallabs::Helpers::Logging
- Tput::Output::Bell
- Tput::Output::Charset
- Tput::Output::Colors
- Tput::Output::Cursor
- Tput::Output::Emulator
- Tput::Output::Misc
- Tput::Output::Mouse
- Tput::Output::Rectangles
- Tput::Output::Screen
- Tput::Output::Scrolling
- Tput::Output::Terminal
- Tput::Output::Text
Direct including types
Defined in:
tput/output.crtput/output/bell.cr
tput/output/charset.cr
tput/output/colors.cr
tput/output/cursor.cr
tput/output/emulator.cr
tput/output/misc.cr
tput/output/mouse.cr
tput/output/rectangles.cr
tput/output/screen.cr
tput/output/scrolling.cr
tput/output/terminal.cr
tput/output/text.cr
Constant Summary
-
Log =
::Log.for((self.name.gsub("::", '.')).underscore)
Instance Method Summary
- #_oprint(*args)
-
#_owrite(*args)
Directly writes string to
@output
(usually STDOUT). -
#_pad_write(code, prn = ->_write(Bytes), done = nil)
Standard output method which takes terminal padding (software timing/delays) into account.
- #_print(*args)
- #_print(&block : IO -> Nil)
-
#_tprint(data)
Wrap escape sequences in DCS sequences and directly print to
@output
. - #_with_io(&block : IO -> Nil)
-
#_write(*args)
Standard output method.
-
#flush
Flushes internal buffer into
@output
and calls@output.flush
Instance methods inherited from module Tput::Output::Terminal
decrst(*arguments)
decrst,
decset(*arguments)
decset,
request_ansi_mode(param = "")
request_ansi_mode,
request_private_mode(param = "")
request_private_mode,
reset
reset,
reset_mode(*arguments)
reset_mode,
set_conformance_level(*arguments)
set_conformance_level,
set_mode(*arguments)
set_mode,
soft_reset
soft_reset
Instance methods inherited from module Tput::Output::Screen
alternate_buffer
alternate_buffer,
clear
clear,
erase_in_display(param = Erase::Below)
erase_in_display,
normal_buffer
normal_buffer
Instance methods inherited from module Tput::Output::Mouse
enable_filter_rectangle(*arguments)
enable_filter_rectangle,
enable_locator_reporting(*arguments)
enable_locator_reporting,
set_locator_events(*arguments)
set_locator_events
Instance methods inherited from module Tput::Output::Rectangles
copy_rectangle(*arguments)
copy_rectangle,
erase_rectangle(top = 0, left = 0, bottom = @screen.height - 1, right = @screen.width - 1)
erase_rectangle,
fill_rectangle(*arguments)
fill_rectangle,
reverse_attr_in_rectangle(*arguments)
reverse_attr_in_rectangle,
select_change_extent(param = 0)
select_change_extent,
selective_erase_rectangle(top = 0, left = 0, bottom = @screen.height - 1, right = @screen.width - 1)
selective_erase_rectangle,
set_attr_in_rectangle(*arguments)
set_attr_in_rectangle
Instance methods inherited from module Tput::Output::Bell
bell
bell,
margin_bell_volume=(param : Volume)
margin_bell_volume=,
warning_bell_volume=(param : Volume)
warning_bell_volume=
Instance methods inherited from module Tput::Output::Emulator
copy_to_clipboard(text)
copy_to_clipboard,
disable_modifiers(param = "")
disable_modifiers,
reset_title_modes(*arguments)
reset_title_modes,
set_pointer_mode(param = "")
set_pointer_mode,
set_resources(*arguments)
set_resources,
set_title_mode_feature(*arguments)
set_title_mode_feature,
title=(title : String)
title=
Instance methods inherited from module Tput::Output::Charset
charset=(charset : C | Nil)
charset=,
enter_alt_charset_mode
enter_alt_charset_mode,
exit_alt_charset_mode
exit_alt_charset_mode,
set_g(val)
set_g
Instance methods inherited from module Tput::Output::Scrolling
index
index,
reverse_index
reverse_index,
scroll_down(param = 1)
scroll_down,
scroll_up(param = 1)
scroll_up,
set_scroll_region(top : Int = 0, bottom : Int = (@screen.height - 1))
set_scroll_region
Instance methods inherited from module Tput::Output::Misc
escape
escape,
load_leds(param = 0)
load_leds,
mc0
mc0,
mc4
mc4,
mc5
mc5,
mc5p
mc5p,
media_copy(*arguments)
media_copy,
null
null,
repeat(str, i = 1)
repeat
Instance methods inherited from module Tput::Output::Text
_attr(param : Array | String, val = true)
_attr,
backspace
backspace,
carriage_return
carriage_return,
char_attributes(param, val)
char_attributes,
delete_chars(param = 1)
delete_chars,
delete_columns(n = 1)
delete_columns,
delete_line(param : Int = 1)
delete_line,
echo(text, attr = nil)
echo,
erase_character(param : Int = 1)
erase_character,
erase_in_line(param = LineDirection::Right)
erase_in_line,
form_feed
form_feed,
horizontal_tabulation_set
horizontal_tabulation_set,
insert_chars(param = 1)
insert_chars,
insert_columns(n = 1)
insert_columns,
insert_line(param : Int = 1)
insert_line,
line_feed
line_feed,
line_height
line_height,
repeat_preceding_character(param = 1)
repeat_preceding_character,
sel_data(a, b)
sel_data,
set_background(color, val)
set_background,
set_char_protection_attr(param = 0)
set_char_protection_attr,
set_foreground(color, val)
set_foreground,
shift_in
shift_in,
shift_out
shift_out,
simple_insert(str, i = 1, attr = nil)
simple_insert,
tab_clear(param = 0)
tab_clear,
text(text, attr)
text,
vertical_tab
vertical_tab
Instance methods inherited from module Tput::Output::Cursor
char_pos_absolute(param : Int32 | Nil = 1)
char_pos_absolute,
cursor_backward(param = 1)
cursor_backward,
cursor_backward_tab(param = 1)
cursor_backward_tab,
cursor_char_absolute(point : Point)cursor_char_absolute(param = 0) cursor_char_absolute, cursor_color(color : String)
cursor_color(color : Color) cursor_color, cursor_down(param = 1) cursor_down, cursor_forward(param : Int = 1) cursor_forward, cursor_forward_tab(param = 1) cursor_forward_tab, cursor_line_absolute(point : Point)
cursor_line_absolute(param = 1) cursor_line_absolute, cursor_next_line(param = 1) cursor_next_line, cursor_position(row : Int = 0, column : Int = 0)
cursor_position(point : Tput::Point) cursor_position, cursor_preceding_line(param = 1) cursor_preceding_line, cursor_shape(shape, blink = false) cursor_shape, cursor_up(param = 1) cursor_up, dynamic_cursor_color(param) dynamic_cursor_color, h_position_relative(param = 1) h_position_relative, hide_cursor hide_cursor, hv_position(row = 0, col = 0) hv_position, lrestore_cursor(key = :local, hide = false) lrestore_cursor, lsave_cursor(key = :local) lsave_cursor, move(point : Point)
move(x = nil, y = nil) move, omove(point : Point)
omove(x = 0, y = 0) omove, reset_cursor reset_cursor, reset_cursor_color reset_cursor_color, restore_cursor(key : String | Nil = nil, hide : Bool = false) restore_cursor, restore_cursor_a restore_cursor_a, restore_reported_cursor restore_reported_cursor, rmove(dx, dy)
rmove(point : Point) rmove, rsetx(dx) rsetx, rsety(dy) rsety, save_cursor(key : String | Nil = nil) save_cursor, save_cursor_a save_cursor_a, set_cursor_style(style = CursorStyle::SteadyBlock) set_cursor_style, show_cursor show_cursor, v_position_relative(param = 1) v_position_relative
Instance Method Detail
Directly writes string to @output
(usually STDOUT).
Mostly not used directly, but through #_write
.
This is plain def write
. We're just not using the exact name "write".
Standard output method which takes terminal padding (software timing/delays) into account.
If no padding/delay instructions are found in the content, the behavior is
identical to #_write
.
Wrap escape sequences in DCS sequences and directly print to @output
.
Tmux will only forward escape sequences to the terminal if surrounded by a DCS sequence.
This method wraps the output in DCS sequences if the detected terminal
emulator is tmux, and then directly prints content to @output
.
(Any existing buffer is first flushed.)
If the terminal emulator is not detected to be tmux, the behavior is
identical to #_write
.
Example: `DCS tmux; ESC Pt ST`
Real: `DCS tmux; ESC Pt ESC \`