[−][src]Trait alacritty_terminal::ansi::Handler
Type that handles actions from the parser.
XXX Should probably not provide default impls for everything, but it makes writing specific handler impls for tests far easier.
Provided methods
fn set_title(&mut self, _: Option<String>)
OSC to set window title.
fn set_cursor_style(&mut self, _: Option<CursorStyle>)
Set the cursor style.
fn input(&mut self, _c: char)
A character to be displayed.
fn goto(&mut self, _: Line, _: Column)
Set cursor to position.
fn goto_line(&mut self, _: Line)
Set cursor to specific row.
fn goto_col(&mut self, _: Column)
Set cursor to specific column.
fn insert_blank(&mut self, _: Column)
Insert blank characters in current line starting from cursor.
fn move_up(&mut self, _: Line)
Move cursor up rows
.
fn move_down(&mut self, _: Line)
Move cursor down rows
.
fn identify_terminal<W: Write>(&mut self, _: &mut W)
Identify the terminal (should write back to the pty stream).
TODO this should probably return an io::Result
fn device_status<W: Write>(&mut self, _: &mut W, _: usize)
Report device status.
fn move_forward(&mut self, _: Column)
Move cursor forward cols
.
fn move_backward(&mut self, _: Column)
Move cursor backward cols
.
fn move_down_and_cr(&mut self, _: Line)
Move cursor down rows
and set to column 1.
fn move_up_and_cr(&mut self, _: Line)
Move cursor up rows
and set to column 1.
fn put_tab(&mut self, _count: i64)
Put count
tabs.
fn backspace(&mut self)
Backspace count
characters.
fn carriage_return(&mut self)
Carriage return.
fn linefeed(&mut self)
Linefeed.
fn bell(&mut self)
Ring the bell.
Hopefully this is never implemented.
fn substitute(&mut self)
Substitute char under cursor.
fn newline(&mut self)
Newline.
fn set_horizontal_tabstop(&mut self)
Set current position as a tabstop.
fn scroll_up(&mut self, _: Line)
Scroll up rows
rows.
fn scroll_down(&mut self, _: Line)
Scroll down rows
rows.
fn insert_blank_lines(&mut self, _: Line)
Insert count
blank lines.
fn delete_lines(&mut self, _: Line)
Delete count
lines.
fn erase_chars(&mut self, _: Column)
Erase count
chars in current line following cursor.
Erase means resetting to the default state (default colors, no content, no mode flags).
fn delete_chars(&mut self, _: Column)
Delete count
chars.
Deleting a character is like the delete key on the keyboard - everything to the right of the deleted things is shifted left.
fn move_backward_tabs(&mut self, _count: i64)
Move backward count
tabs.
fn move_forward_tabs(&mut self, _count: i64)
Move forward count
tabs.
fn save_cursor_position(&mut self)
Save current cursor position.
fn restore_cursor_position(&mut self)
Restore cursor position.
fn clear_line(&mut self, _mode: LineClearMode)
Clear current line.
fn clear_screen(&mut self, _mode: ClearMode)
Clear screen.
fn clear_tabs(&mut self, _mode: TabulationClearMode)
Clear tab stops.
fn reset_state(&mut self)
Reset terminal state.
fn reverse_index(&mut self)
Reverse Index.
Move the active position to the same horizontal position on the preceding line. If the active position is at the top margin, a scroll down is performed.
fn terminal_attribute(&mut self, _attr: Attr)
Set a terminal attribute.
fn set_mode(&mut self, _mode: Mode)
Set mode.
fn unset_mode(&mut self, _: Mode)
Unset mode.
fn set_scrolling_region(&mut self, _top: usize, _bottom: Option<usize>)
DECSTBM - Set the terminal scrolling region.
fn set_keypad_application_mode(&mut self)
DECKPAM - Set keypad to applications mode (ESCape instead of digits).
fn unset_keypad_application_mode(&mut self)
DECKPNM - Set keypad to numeric mode (digits instead of ESCape seq).
fn set_active_charset(&mut self, _: CharsetIndex)
Set one of the graphic character sets, G0 to G3, as the active charset.
'Invoke' one of G0 to G3 in the GL area. Also referred to as shift in, shift out and locking shift depending on the set being activated.
fn configure_charset(&mut self, _: CharsetIndex, _: StandardCharset)
Assign a graphic character set to G0, G1, G2 or G3.
'Designate' a graphic character set as one of G0 to G3, so that it can
later be 'invoked' by set_active_charset
.
fn set_color(&mut self, _: usize, _: Rgb)
Set an indexed color value.
fn dynamic_color_sequence<W: Write>(
&mut self,
_: &mut W,
_: u8,
_: usize,
_: &str
)
&mut self,
_: &mut W,
_: u8,
_: usize,
_: &str
)
Write a foreground/background color escape sequence with the current color.
fn reset_color(&mut self, _: usize)
Reset an indexed color to original value.
fn clipboard_store(&mut self, _: u8, _: &[u8])
Store data into clipboard.
fn clipboard_load(&mut self, _: u8, _: &str)
Load data from clipboard.
fn decaln(&mut self)
Run the decaln routine.
fn push_title(&mut self)
Push a title onto the stack.
fn pop_title(&mut self)
Pop the last title from the stack.
Implementors
impl<T: EventListener> Handler for Term<T>
[src]
fn input(&mut self, c: char)
[src]
A character to be displayed.
fn decaln(&mut self)
[src]
fn goto(&mut self, line: Line, col: Column)
[src]
fn goto_line(&mut self, line: Line)
[src]
fn goto_col(&mut self, col: Column)
[src]
fn insert_blank(&mut self, count: Column)
[src]
fn move_up(&mut self, lines: Line)
[src]
fn move_down(&mut self, lines: Line)
[src]
fn move_forward(&mut self, cols: Column)
[src]
fn move_backward(&mut self, cols: Column)
[src]
fn identify_terminal<W: Write>(&mut self, writer: &mut W)
[src]
fn device_status<W: Write>(&mut self, writer: &mut W, arg: usize)
[src]
fn move_down_and_cr(&mut self, lines: Line)
[src]
fn move_up_and_cr(&mut self, lines: Line)
[src]
fn put_tab(&mut self, count: i64)
[src]
Insert tab at cursor position.
fn backspace(&mut self)
[src]
Backspace count
characters.
fn carriage_return(&mut self)
[src]
Carriage return.
fn linefeed(&mut self)
[src]
Linefeed.
fn bell(&mut self)
[src]
Set current position as a tabstop.
fn substitute(&mut self)
[src]
fn newline(&mut self)
[src]
Run LF/NL.
LF/NL mode has some interesting history. According to ECMA-48 4th edition, in LINE FEED mode,
The execution of the formatter functions LINE FEED (LF), FORM FEED (FF), LINE TABULATION (VT) cause only movement of the active position in the direction of the line progression.
In NEW LINE mode,
The execution of the formatter functions LINE FEED (LF), FORM FEED (FF), LINE TABULATION (VT) cause movement to the line home position on the following line, the following form, etc. In the case of LF this is referred to as the New Line (NL) option.
Additionally, ECMA-48 4th edition says that this option is deprecated. ECMA-48 5th edition only mentions this option (without explanation) saying that it's been removed.
As an emulator, we need to support it since applications may still rely on it.
fn set_horizontal_tabstop(&mut self)
[src]
fn scroll_up(&mut self, lines: Line)
[src]
fn scroll_down(&mut self, lines: Line)
[src]
fn insert_blank_lines(&mut self, lines: Line)
[src]
fn delete_lines(&mut self, lines: Line)
[src]
fn erase_chars(&mut self, count: Column)
[src]
fn delete_chars(&mut self, count: Column)
[src]
fn move_backward_tabs(&mut self, count: i64)
[src]
fn move_forward_tabs(&mut self, count: i64)
[src]
fn save_cursor_position(&mut self)
[src]
fn restore_cursor_position(&mut self)
[src]
fn clear_line(&mut self, mode: LineClearMode)
[src]
fn set_color(&mut self, index: usize, color: Rgb)
[src]
Set the indexed color value.
fn dynamic_color_sequence<W: Write>(
&mut self,
writer: &mut W,
code: u8,
index: usize,
terminator: &str
)
[src]
&mut self,
writer: &mut W,
code: u8,
index: usize,
terminator: &str
)
Write a foreground/background color escape sequence with the current color.
fn reset_color(&mut self, index: usize)
[src]
Reset the indexed color to original value.
fn clipboard_store(&mut self, clipboard: u8, base64: &[u8])
[src]
Store data into clipboard.
fn clipboard_load(&mut self, clipboard: u8, terminator: &str)
[src]
Load data from clipboard.
fn clear_screen(&mut self, mode: ClearMode)
[src]
fn clear_tabs(&mut self, mode: TabulationClearMode)
[src]
fn reset_state(&mut self)
[src]
Reset all important fields in the term struct.
fn reverse_index(&mut self)
[src]
fn terminal_attribute(&mut self, attr: Attr)
[src]
Set a terminal attribute.