[−][src]Enum alacritty::selection::Selection
Describes a region of a 2-dimensional area
Used to track a text selection. There are three supported modes, each with its own constructor:
simple, semantic, and lines. The simple mode precisely tracks which cells are
selected without any expansion. semantic mode expands the initial selection to the nearest
semantic escape char in either direction. lines will always select entire lines.
Calls to [update] operate different based on the selection kind. The simple mode does
nothing special, simply tracks points and sides. semantic will continue to expand out to
semantic boundaries as the selection point changes. Similarly, lines will always expand the
new point to encompass entire lines.
Variants
SimpleFields of Simple
SemanticFields of Semantic
LinesFields of Lines
Methods
impl Selection[src]
pub fn simple(location: Point<usize>, side: Side) -> Selection[src]
pub fn rotate(&mut self, offset: isize)[src]
pub fn semantic(point: Point<usize>) -> Selection[src]
pub fn lines(point: Point<usize>) -> Selection[src]
pub fn update(&mut self, location: Point<usize>, side: Side)[src]
pub fn to_span<G>(&self, grid: &G, alt_screen: bool) -> Option<Span> where
G: Search + Dimensions, [src]
G: Search + Dimensions,
pub fn is_empty(&self) -> bool[src]
Trait Implementations
impl Clone for Selection[src]
fn clone(&self) -> Selection[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl PartialEq<Selection> for Selection[src]
impl Debug for Selection[src]
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.