[][src]Struct alacritty::grid::Grid

pub struct Grid<T> {
    pub selection: Option<Selection>,
    pub url_highlight: Option<RangeInclusive<Linear>>,
    // some fields omitted
}

Represents the terminal display contents

Fields

selection: Option<Selection>

Selected region

url_highlight: Option<RangeInclusive<Linear>>

Range for URL hover highlights

Methods

impl<T: GridCell + Copy + Clone> Grid<T>[src]

pub fn new(lines: Line, cols: Column, scrollback: usize, template: T) -> Grid<T>[src]

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

pub fn buffer_line_to_visible(&self, line: usize) -> ViewportPosition[src]

pub fn visible_line_to_buffer(&self, line: Line) -> usize[src]

pub fn update_history(&mut self, history_size: usize, template: &T)[src]

Update the size of the scrollback history

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

pub fn resize(
    &mut self,
    lines: Line,
    cols: Column,
    cursor_pos: &mut Point,
    template: &T
)
[src]

pub fn line_to_offset(&self, line: Line) -> usize[src]

Convert a Line index (active region) to a buffer offset

Panics

This method will panic if Line is larger than the grid dimensions

pub fn scroll_down(
    &mut self,
    region: &Range<Line>,
    positions: Line,
    template: &T
)
[src]

pub fn scroll_up(&mut self, region: &Range<Line>, positions: Line, template: &T)[src]

scroll_up moves lines at the bottom towards the top

This is the performance-sensitive part of scrolling.

pub fn reset(&mut self, template: &T)[src]

impl<T> Grid<T>[src]

pub fn num_lines(&self) -> Line[src]

Important traits for DisplayIter<'a, T>
pub fn display_iter(&self) -> DisplayIter<T>[src]

pub fn num_cols(&self) -> Column[src]

pub fn clear_history(&mut self)[src]

pub fn scroll_limit(&self) -> usize[src]

pub fn len(&self) -> usize[src]

Total number of lines in the buffer, this includes scrollback + visible lines

pub fn history_size(&self) -> usize[src]

pub fn initialize_all(&mut self, template: &T) where
    T: Copy
[src]

This is used only for initializing after loading ref-tests

pub fn truncate(&mut self)[src]

This is used only for truncating before saving ref-tests

Important traits for GridIterator<'a, T>
pub fn iter_from(&self, point: Point<usize>) -> GridIterator<T>[src]

pub fn contains(&self, point: &Point) -> bool[src]

pub fn display_offset(&self) -> usize[src]

Trait Implementations

impl<T> IndexRegion<Range<Line>, T> for Grid<T>[src]

impl<T> IndexRegion<RangeTo<Line>, T> for Grid<T>[src]

impl<T> IndexRegion<RangeFrom<Line>, T> for Grid<T>[src]

impl<T> IndexRegion<RangeFull, T> for Grid<T>[src]

impl<T: Clone> Clone for Grid<T>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<T: PartialEq> PartialEq<Grid<T>> for Grid<T>[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl<T> Index<Line> for Grid<T>[src]

Index active region by line

type Output = Row<T>

The returned type after indexing.

impl<T> Index<usize> for Grid<T>[src]

Index with buffer offset

type Output = Row<T>

The returned type after indexing.

impl<'point, T> Index<&'point Point<Line>> for Grid<T>[src]

type Output = T

The returned type after indexing.

impl<T> IndexMut<Line> for Grid<T>[src]

impl<T> IndexMut<usize> for Grid<T>[src]

impl<'point, T> IndexMut<&'point Point<Line>> for Grid<T>[src]

impl<T: Debug> Debug for Grid<T>[src]

impl<T> Serialize for Grid<T> where
    T: Serialize
[src]

impl<'de, T> Deserialize<'de> for Grid<T> where
    T: Deserialize<'de>, 
[src]

Auto Trait Implementations

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

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

Blanket Implementations

impl<T> From for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

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]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]