[−][src]Struct alacritty::grid::Grid
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]
&mut self,
lines: Line,
cols: Column,
cursor_pos: &mut Point,
template: &T
)
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]
&mut self,
region: &Range<Line>,
positions: Line,
template: &T
)
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]
T: Copy,
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]
fn region(&self, index: Range<Line>) -> Region<T>[src]
fn region_mut(&mut self, index: Range<Line>) -> RegionMut<T>[src]
impl<T> IndexRegion<RangeTo<Line>, T> for Grid<T>[src]
fn region(&self, index: RangeTo<Line>) -> Region<T>[src]
fn region_mut(&mut self, index: RangeTo<Line>) -> RegionMut<T>[src]
impl<T> IndexRegion<RangeFrom<Line>, T> for Grid<T>[src]
fn region(&self, index: RangeFrom<Line>) -> Region<T>[src]
fn region_mut(&mut self, index: RangeFrom<Line>) -> RegionMut<T>[src]
impl<T> IndexRegion<RangeFull, T> for Grid<T>[src]
fn region(&self, _: RangeFull) -> Region<T>[src]
fn region_mut(&mut self, _: RangeFull) -> RegionMut<T>[src]
impl<T: Clone> Clone for Grid<T>[src]
fn clone(&self) -> 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]
fn eq(&self, other: &Self) -> bool[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
This method tests for !=.
impl<T> Index<Line> for Grid<T>[src]
Index active region by line
impl<T> Index<usize> for Grid<T>[src]
Index with buffer offset
impl<'point, T> Index<&'point Point<Line>> for Grid<T>[src]
type Output = T
The returned type after indexing.
fn index<'a>(&'a self, point: &Point) -> &'a T[src]
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]
T: Serialize,
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer, [src]
__S: Serializer,
impl<'de, T> Deserialize<'de> for Grid<T> where
T: Deserialize<'de>, [src]
T: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]
__D: Deserializer<'de>,
Auto Trait Implementations
Blanket Implementations
impl<T> From for T[src]
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> SetParameter for T[src]
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>, [src]
T: Parameter<Self>,
Sets value as a parameter of self.
impl<T> Erased for T[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>, [src]
T: Deserialize<'de>,