pub enum CaretShape {
Bar,
Block,
Underline,
}Expand description
The app-wide caret shape. Terminal cursors follow their terminal instead.
Variants§
Implementations§
Source§impl CaretShape
impl CaretShape
Sourcepub fn shown(self, window_active: bool, inactive: InactiveCaret) -> bool
pub fn shown(self, window_active: bool, inactive: InactiveCaret) -> bool
Whether a caret of this shape paints at all, given whether its window is active. Only a block changes with the window.
Sourcepub fn quad(
self,
bar: Bounds<Pixels>,
line_height: Pixels,
height: CaretHeight,
width: Pixels,
color: Hsla,
hollow: bool,
) -> PaintQuad
pub fn quad( self, bar: Bounds<Pixels>, line_height: Pixels, height: CaretHeight, width: Pixels, color: Hsla, hollow: bool, ) -> PaintQuad
Adapts a renderer’s existing bar, centred in a line line_height tall,
to width, which a bar ignores. A block stands as tall as height
says, solid or, when hollow, outlined.
Trait Implementations§
Source§impl Clone for CaretShape
impl Clone for CaretShape
impl Copy for CaretShape
Source§impl Debug for CaretShape
impl Debug for CaretShape
Source§impl Default for CaretShape
impl Default for CaretShape
impl Eq for CaretShape
impl Global for CaretShape
Source§impl PartialEq for CaretShape
impl PartialEq for CaretShape
impl StructuralPartialEq for CaretShape
Auto Trait Implementations§
impl Freeze for CaretShape
impl RefUnwindSafe for CaretShape
impl Send for CaretShape
impl Sync for CaretShape
impl Unpin for CaretShape
impl UnsafeUnpin for CaretShape
impl UnwindSafe for CaretShape
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ReadGlobal for Twhere
T: Global,
impl<T> ReadGlobal for Twhere
T: Global,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().Source§impl<T> UpdateGlobal for Twhere
T: Global,
impl<T> UpdateGlobal for Twhere
T: Global,
Source§fn update_global<C, F, R>(cx: &mut C, update: F) -> R
fn update_global<C, F, R>(cx: &mut C, update: F) -> R
Updates the global instance of the implementing type using the provided closure. Read more
Source§fn set_global<C>(cx: &mut C, global: T)where
C: BorrowAppContext,
fn set_global<C>(cx: &mut C, global: T)where
C: BorrowAppContext,
Set the global instance of the implementing type.