[][src]Struct alacritty::term::Term

pub struct Term {
    pub font_size: Size,
    pub dirty: bool,
    pub visual_bell: VisualBell,
    pub next_is_urgent: Option<bool>,
    // some fields omitted
}

Fields

font_size: Size

Font size

dirty: boolvisual_bell: VisualBellnext_is_urgent: Option<bool>

Methods

impl Term[src]

pub fn selection(&self) -> &Option<Selection>[src]

pub fn selection_mut(&mut self) -> &mut Option<Selection>[src]

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

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

pub fn get_next_mouse_cursor(&mut self) -> Option<MouseCursor>[src]

pub fn new(
    config: &Config,
    size: SizeInfo,
    message_buffer: MessageBuffer
) -> Term
[src]

pub fn change_font_size(&mut self, delta: f32)[src]

pub fn reset_font_size(&mut self)[src]

pub fn update_config(&mut self, config: &Config)[src]

pub fn needs_draw(&self) -> bool[src]

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

pub fn pixels_to_coords(&self, x: usize, y: usize) -> Option<Point>[src]

Convert the given pixel values to a grid coordinate

The mouse coordinates are expected to be relative to the top left. The line and column returned are also relative to the top left.

Returns None if the coordinates are outside the window, padding pixels are considered inside the window

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.

Important traits for RenderableCellsIter<'a>
pub fn renderable_cells<'b>(
    &'b self,
    config: &'b Config,
    window_focused: bool,
    metrics: Metrics
) -> RenderableCellsIter
[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 size_info(&self) -> &SizeInfo[src]

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

pub fn cursor(&self) -> &Cursor[src]

pub fn swap_alt(&mut self)[src]

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

pub fn message_buffer_mut(&mut self) -> &mut MessageBuffer[src]

pub fn message_buffer(&self) -> &MessageBuffer[src]

pub fn exit(&mut self)[src]

pub fn should_exit(&self) -> bool[src]

pub fn set_url_highlight(&mut self, hl: RangeInclusive<Linear>)[src]

pub fn reset_url_highlight(&mut self)[src]

Trait Implementations

impl TermInfo for Term[src]

impl Handler for Term[src]

fn set_title(&mut self, title: &str)[src]

Set the window title

fn set_mouse_cursor(&mut self, cursor: MouseCursor)[src]

Set the mouse cursor

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

A character to be displayed

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 reset_color(&mut self, index: usize)[src]

Reset the indexed color to original value

fn set_clipboard(&mut self, string: &str)[src]

Set the clipboard

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

set a terminal attribute

impl Dimensions for Term[src]

Auto Trait Implementations

impl Send for Term

impl Sync for Term

Blanket Implementations

impl<T> From for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

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

The type returned in the event of a conversion error.

impl<T> SetParameter for T[src]

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 
[src]

Sets value as a parameter of self.

impl<T> Erased for T[src]