pub trait ScreenWriter {
Show 72 methods
// Required method
fn collect_add(&mut self, ch: char, cell: &CellState);
// Provided methods
fn collect_add_with_charset(
&mut self,
ch: char,
cell: &CellState,
acs: bool,
) { ... }
fn collect_end(&mut self) { ... }
fn cursor_up(&mut self, n: u32) { ... }
fn cursor_down(&mut self, n: u32) { ... }
fn cursor_left(&mut self, n: u32) { ... }
fn cursor_right(&mut self, n: u32) { ... }
fn cursor_move(&mut self, col: i32, row: i32, origin_mode: bool) { ... }
fn insert_line(&mut self, n: u32, bg: i32) { ... }
fn delete_line(&mut self, n: u32, bg: i32) { ... }
fn scroll_up(&mut self, n: u32, bg: i32) { ... }
fn scroll_down(&mut self, n: u32, bg: i32) { ... }
fn linefeed(&mut self, wrapped: bool, bg: i32) { ... }
fn reverse_index(&mut self, bg: i32) { ... }
fn carriage_return(&mut self) { ... }
fn backspace(&mut self) { ... }
fn insert_character(&mut self, n: u32, bg: i32) { ... }
fn delete_character(&mut self, n: u32, bg: i32) { ... }
fn clear_character(&mut self, n: u32, bg: i32) { ... }
fn clear_end_of_screen(&mut self, bg: i32) { ... }
fn clear_start_of_screen(&mut self, bg: i32) { ... }
fn clear_screen(&mut self, bg: i32) { ... }
fn clear_history(&mut self) { ... }
fn clear_end_of_line(&mut self, bg: i32) { ... }
fn clear_start_of_line(&mut self, bg: i32) { ... }
fn clear_line(&mut self, bg: i32) { ... }
fn mode_set(&mut self, mode: u32) { ... }
fn mode_clear(&mut self, mode: u32) { ... }
fn set_scroll_region(&mut self, top: u32, bottom: u32) { ... }
fn alternate_on(&mut self, bg: i32, save_cursor: bool) { ... }
fn alternate_off(&mut self, bg: i32, restore_cursor: bool) { ... }
fn reset_attributes(&mut self) { ... }
fn tab(&mut self) { ... }
fn cursor_backward_tab(&mut self, n: u32) { ... }
fn set_tab_stop(&mut self) { ... }
fn clear_tab_stop(&mut self) { ... }
fn clear_all_tab_stops(&mut self) { ... }
fn set_title(&mut self, title: &str) { ... }
fn set_window_name(&mut self, name: &str) { ... }
fn set_path(&mut self, path: &str) { ... }
fn save_cursor(&mut self) { ... }
fn restore_cursor(&mut self) { ... }
fn alignment_test(&mut self) { ... }
fn full_reset(&mut self) { ... }
fn start_sync(&mut self) { ... }
fn stop_sync(&mut self) { ... }
fn set_cursor_style(&mut self, n: u32) { ... }
fn osc_palette(&mut self, data: &str, end: InputEndType) { ... }
fn osc_hyperlink(&mut self, data: &str) { ... }
fn current_hyperlink_id(&self) -> u32 { ... }
fn osc_notification(&mut self, data: &str) { ... }
fn osc_fg_colour(&mut self, data: &str, end: InputEndType) { ... }
fn osc_bg_colour(&mut self, data: &str, end: InputEndType) { ... }
fn osc_cursor_colour(&mut self, data: &str, end: InputEndType) { ... }
fn osc_clipboard(&mut self, data: &str, end: InputEndType) { ... }
fn osc_reset_palette(&mut self, data: &str) { ... }
fn osc_reset_fg(&mut self) { ... }
fn osc_reset_bg(&mut self) { ... }
fn osc_reset_cursor(&mut self) { ... }
fn osc_shell_integration(&mut self, data: &str) { ... }
fn dcs_passthrough(&mut self, data: &[u8]) { ... }
fn sixel_passthrough(&mut self, data: &[u8]) { ... }
fn apc_passthrough(&mut self, data: &[u8]) { ... }
fn bell(&mut self) { ... }
fn screen_size_x(&self) -> u32 { ... }
fn screen_size_y(&self) -> u32 { ... }
fn cursor_x(&self) -> u32 { ... }
fn cursor_y(&self) -> u32 { ... }
fn current_mode(&self) -> u32 { ... }
fn push_title(&mut self) { ... }
fn pop_title(&mut self) { ... }
fn notify_pane_title_changed(&mut self) { ... }
}Expand description
Screen-write abstraction trait.
The parser calls these methods to effect terminal changes. rmux-server
implements this trait against its pane/grid runtime.
Required Methods§
Sourcefn collect_add(&mut self, ch: char, cell: &CellState)
fn collect_add(&mut self, ch: char, cell: &CellState)
Add a printable character with current cell attributes.
Provided Methods§
Sourcefn collect_add_with_charset(&mut self, ch: char, cell: &CellState, acs: bool)
fn collect_add_with_charset(&mut self, ch: char, cell: &CellState, acs: bool)
Add a printable character, applying ACS charset if acs is true.
Sourcefn collect_end(&mut self)
fn collect_end(&mut self)
End character collection (flush). Called before non-print transitions.
Sourcefn cursor_down(&mut self, n: u32)
fn cursor_down(&mut self, n: u32)
Move cursor down by n rows.
Sourcefn cursor_left(&mut self, n: u32)
fn cursor_left(&mut self, n: u32)
Move cursor left by n columns.
Sourcefn cursor_right(&mut self, n: u32)
fn cursor_right(&mut self, n: u32)
Move cursor right by n columns.
Sourcefn cursor_move(&mut self, col: i32, row: i32, origin_mode: bool)
fn cursor_move(&mut self, col: i32, row: i32, origin_mode: bool)
Move cursor to absolute position. -1 means “don’t change”.
Sourcefn insert_line(&mut self, n: u32, bg: i32)
fn insert_line(&mut self, n: u32, bg: i32)
Insert n blank lines at cursor, scrolling down.
Sourcefn delete_line(&mut self, n: u32, bg: i32)
fn delete_line(&mut self, n: u32, bg: i32)
Delete n lines at cursor, scrolling up.
Sourcefn scroll_down(&mut self, n: u32, bg: i32)
fn scroll_down(&mut self, n: u32, bg: i32)
Scroll down by n lines.
Sourcefn reverse_index(&mut self, bg: i32)
fn reverse_index(&mut self, bg: i32)
Reverse index (scroll down or move up).
Sourcefn carriage_return(&mut self)
fn carriage_return(&mut self)
Carriage return.
Sourcefn insert_character(&mut self, n: u32, bg: i32)
fn insert_character(&mut self, n: u32, bg: i32)
Insert n blank characters at cursor.
Sourcefn delete_character(&mut self, n: u32, bg: i32)
fn delete_character(&mut self, n: u32, bg: i32)
Delete n characters at cursor.
Sourcefn clear_character(&mut self, n: u32, bg: i32)
fn clear_character(&mut self, n: u32, bg: i32)
Erase (clear) n characters at cursor.
Sourcefn clear_end_of_screen(&mut self, bg: i32)
fn clear_end_of_screen(&mut self, bg: i32)
Clear to end of screen.
Sourcefn clear_start_of_screen(&mut self, bg: i32)
fn clear_start_of_screen(&mut self, bg: i32)
Clear from start of screen.
Sourcefn clear_screen(&mut self, bg: i32)
fn clear_screen(&mut self, bg: i32)
Clear entire screen.
Sourcefn clear_history(&mut self)
fn clear_history(&mut self)
Clear scrollback history.
Sourcefn clear_end_of_line(&mut self, bg: i32)
fn clear_end_of_line(&mut self, bg: i32)
Clear to end of line.
Sourcefn clear_start_of_line(&mut self, bg: i32)
fn clear_start_of_line(&mut self, bg: i32)
Clear from start of line.
Sourcefn clear_line(&mut self, bg: i32)
fn clear_line(&mut self, bg: i32)
Clear entire line.
Sourcefn mode_clear(&mut self, mode: u32)
fn mode_clear(&mut self, mode: u32)
Clear mode bits.
Sourcefn set_scroll_region(&mut self, top: u32, bottom: u32)
fn set_scroll_region(&mut self, top: u32, bottom: u32)
Set scroll region (top and bottom margins, 0-based).
Sourcefn alternate_on(&mut self, bg: i32, save_cursor: bool)
fn alternate_on(&mut self, bg: i32, save_cursor: bool)
Switch to alternate screen. save_cursor = true for 1049.
Sourcefn alternate_off(&mut self, bg: i32, restore_cursor: bool)
fn alternate_off(&mut self, bg: i32, restore_cursor: bool)
Switch back from alternate screen.
Sourcefn reset_attributes(&mut self)
fn reset_attributes(&mut self)
Reset cell attributes to default.
Sourcefn cursor_backward_tab(&mut self, n: u32)
fn cursor_backward_tab(&mut self, n: u32)
Move cursor backward n tab stops (CBT).
Sourcefn set_tab_stop(&mut self)
fn set_tab_stop(&mut self)
Set a tab stop at the current cursor column.
Sourcefn clear_tab_stop(&mut self)
fn clear_tab_stop(&mut self)
Clear a tab stop at the current cursor column.
Sourcefn clear_all_tab_stops(&mut self)
fn clear_all_tab_stops(&mut self)
Clear all tab stops.
Sourcefn set_window_name(&mut self, name: &str)
fn set_window_name(&mut self, name: &str)
Set the window name (from rename string).
Sourcefn save_cursor(&mut self)
fn save_cursor(&mut self)
Save cursor state (DECSC).
Sourcefn restore_cursor(&mut self)
fn restore_cursor(&mut self)
Restore cursor state (DECRC).
Sourcefn alignment_test(&mut self)
fn alignment_test(&mut self)
Fill screen with ‘E’ characters (DECALN).
Sourcefn full_reset(&mut self)
fn full_reset(&mut self)
Full terminal reset (RIS).
Sourcefn start_sync(&mut self)
fn start_sync(&mut self)
Start synchronized output.
Sourcefn set_cursor_style(&mut self, n: u32)
fn set_cursor_style(&mut self, n: u32)
Set cursor style (DECSCUSR). n is the Ps value 0-6.
Sourcefn osc_palette(&mut self, data: &str, end: InputEndType)
fn osc_palette(&mut self, data: &str, end: InputEndType)
Handle OSC 4 palette colour.
Sourcefn osc_hyperlink(&mut self, data: &str)
fn osc_hyperlink(&mut self, data: &str)
Handle OSC 8 hyperlink.
Sourcefn current_hyperlink_id(&self) -> u32
fn current_hyperlink_id(&self) -> u32
Returns the active OSC 8 hyperlink inner ID.
Sourcefn osc_notification(&mut self, data: &str)
fn osc_notification(&mut self, data: &str)
Handle OSC 9 notification.
Sourcefn osc_fg_colour(&mut self, data: &str, end: InputEndType)
fn osc_fg_colour(&mut self, data: &str, end: InputEndType)
Handle OSC 10 fg colour query/set.
Sourcefn osc_bg_colour(&mut self, data: &str, end: InputEndType)
fn osc_bg_colour(&mut self, data: &str, end: InputEndType)
Handle OSC 11 bg colour query/set.
Sourcefn osc_cursor_colour(&mut self, data: &str, end: InputEndType)
fn osc_cursor_colour(&mut self, data: &str, end: InputEndType)
Handle OSC 12 cursor colour query/set.
Sourcefn osc_clipboard(&mut self, data: &str, end: InputEndType)
fn osc_clipboard(&mut self, data: &str, end: InputEndType)
Handle OSC 52 clipboard.
Sourcefn osc_reset_palette(&mut self, data: &str)
fn osc_reset_palette(&mut self, data: &str)
Handle OSC 104 reset palette.
Sourcefn osc_reset_fg(&mut self)
fn osc_reset_fg(&mut self)
Handle OSC 110 reset fg.
Sourcefn osc_reset_bg(&mut self)
fn osc_reset_bg(&mut self)
Handle OSC 111 reset bg.
Sourcefn osc_reset_cursor(&mut self)
fn osc_reset_cursor(&mut self)
Handle OSC 112 reset cursor colour.
Sourcefn osc_shell_integration(&mut self, data: &str)
fn osc_shell_integration(&mut self, data: &str)
Handle OSC 133 shell integration.
Sourcefn dcs_passthrough(&mut self, data: &[u8])
fn dcs_passthrough(&mut self, data: &[u8])
Handle DCS passthrough string.
Sourcefn sixel_passthrough(&mut self, data: &[u8])
fn sixel_passthrough(&mut self, data: &[u8])
Handle an opaque SIXEL DCS passthrough string.
Sourcefn apc_passthrough(&mut self, data: &[u8])
fn apc_passthrough(&mut self, data: &[u8])
Handle an opaque APC passthrough string.
Sourcefn screen_size_x(&self) -> u32
fn screen_size_x(&self) -> u32
Get screen width in columns.
Sourcefn screen_size_y(&self) -> u32
fn screen_size_y(&self) -> u32
Get screen height in rows.
Sourcefn current_mode(&self) -> u32
fn current_mode(&self) -> u32
Get current screen mode flags.
Sourcefn push_title(&mut self)
fn push_title(&mut self)
Push current title onto the stack.
Sourcefn notify_pane_title_changed(&mut self)
fn notify_pane_title_changed(&mut self)
Signal that the pane title changed.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".