[][src]Struct alacritty_terminal::term::Term

pub struct Term<T> {
    pub dirty: bool,
    pub visual_bell: VisualBell,
    pub is_focused: bool,
    pub vi_mode_cursor: ViModeCursor,
    pub selection: Option<Selection>,
    // some fields omitted
}

Fields

dirty: bool

Terminal requires redraw.

visual_bell: VisualBell

Visual bell configuration and status.

is_focused: bool

Terminal focus controlling the cursor shape.

vi_mode_cursor: ViModeCursor

Cursor for keyboard selection.

selection: Option<Selection>

Implementations

impl<T> Term<T>[src]

Enter terminal buffer search mode.

Cancel active terminal buffer search.

pub fn search_next(
    &self,
    origin: Point<usize>,
    direction: Direction,
    side: Side,
    max_lines: Option<usize>
) -> Option<RangeInclusive<Point<usize>>>
[src]

Get next search match in the specified direction.

pub fn regex_search_left(
    &self,
    start: Point<usize>,
    end: Point<usize>
) -> Option<RangeInclusive<Point<usize>>>
[src]

Find the next regex match to the left of the origin point.

The origin is always included in the regex.

pub fn regex_search_right(
    &self,
    start: Point<usize>,
    end: Point<usize>
) -> Option<RangeInclusive<Point<usize>>>
[src]

Find the next regex match to the right of the origin point.

The origin is always included in the regex.

Find next matching bracket.

pub fn semantic_search_left(&self, point: Point<usize>) -> Point<usize>[src]

Find left end of semantic block.

pub fn semantic_search_right(&self, point: Point<usize>) -> Point<usize>[src]

Find right end of semantic block.

pub fn line_search_left(&self, point: Point<usize>) -> Point<usize>[src]

Find the beginning of the current line across linewraps.

pub fn line_search_right(&self, point: Point<usize>) -> Point<usize>[src]

Find the end of the current line across linewraps.

impl<T> Term<T>[src]

pub fn scroll_display(&mut self, scroll: Scroll) where
    T: EventListener
[src]

pub fn new<C>(config: &Config<C>, size: &SizeInfo, event_proxy: T) -> Term<T>[src]

pub fn update_config<C>(&mut self, config: &Config<C>) where
    T: EventListener
[src]

pub fn selection_to_string(&self) -> Option<String>[src]

Convert the active selection to a String.

pub fn bounds_to_string(&self, start: Point<usize>, end: Point<usize>) -> String[src]

Convert range between two points to a String.

pub fn visible_to_buffer(&self, point: Point) -> Point<usize>[src]

pub fn grid(&self) -> &Grid<Cell>[src]

Access to the raw grid data structure.

This is a bit of a hack; when the window is closed, the event processor serializes the grid state to a file.

pub fn renderable_cells<'b, C>(
    &'b self,
    config: &'b Config<C>
) -> RenderableCellsIter<C>

Important traits for RenderableCellsIter<'a, C>

impl<'a, C> Iterator for RenderableCellsIter<'a, C> type Item = RenderableCell;
[src]

Iterate over the renderable cells in the terminal.

A renderable cell is any cell which has content other than the default background color. Cells with an alternate background color are considered renderable as are cells with any text content.

pub fn resize(&mut self, size: &SizeInfo)[src]

Resize terminal to new dimensions.

pub fn mode(&self) -> &TermMode[src]

Active terminal modes.

pub fn swap_alt(&mut self)[src]

Swap primary and alternate screen buffer.

pub fn background_color(&self) -> Rgb[src]

pub fn exit(&mut self) where
    T: EventListener
[src]

pub fn toggle_vi_mode(&mut self)[src]

Toggle the vi mode.

pub fn vi_motion(&mut self, motion: ViMotion) where
    T: EventListener
[src]

Move vi mode cursor.

pub fn vi_goto_point(&mut self, point: Point<usize>) where
    T: EventListener
[src]

Move vi cursor to absolute point in grid.

pub fn scroll_to_point(&mut self, point: Point<usize>) where
    T: EventListener
[src]

Scroll display to point if it is outside of viewport.

pub fn expand_wide(
    &self,
    point: Point<usize>,
    direction: Direction
) -> Point<usize>
[src]

Jump to the end of a wide cell.

pub fn semantic_escape_chars(&self) -> &str[src]

Trait Implementations

impl<T> Dimensions for Term<T>[src]

impl<T: EventListener> Handler for Term<T>[src]

fn input(&mut self, c: char)[src]

A character to be displayed.

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 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_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]

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 reset_state(&mut self)[src]

Reset all important fields in the term struct.

fn terminal_attribute(&mut self, attr: Attr)[src]

Set a terminal attribute.

Auto Trait Implementations

impl<T> RefUnwindSafe for Term<T> where
    T: RefUnwindSafe

impl<T> Send for Term<T> where
    T: Send

impl<T> Sync for Term<T> where
    T: Sync

impl<T> Unpin for Term<T> where
    T: Unpin

impl<T> UnwindSafe for Term<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.