pub struct MousePointer<'a> { /* private fields */ }Expand description
A widget that renders a mouse pointer indicator.
This widget should be rendered last (on top of other widgets) to ensure the pointer is visible above all other content.
Implementations§
Source§impl<'a> MousePointer<'a>
impl<'a> MousePointer<'a>
Sourcepub fn new(state: &'a MousePointerState) -> Self
pub fn new(state: &'a MousePointerState) -> Self
Create a new mouse pointer widget.
Sourcepub fn style(self, style: MousePointerStyle) -> Self
pub fn style(self, style: MousePointerStyle) -> Self
Set the style.
Sourcepub fn render(self, buf: &mut Buffer)
pub fn render(self, buf: &mut Buffer)
Render the pointer to the buffer at the stored position.
This method renders directly to the buffer without area constraints. The pointer will only render if enabled and position is set.
Sourcepub fn render_in_area(self, buf: &mut Buffer, area: Rect)
pub fn render_in_area(self, buf: &mut Buffer, area: Rect)
Render the pointer within a constrained area.
The pointer will only render if it falls within the given area.
Trait Implementations§
Source§impl<'a> Clone for MousePointer<'a>
impl<'a> Clone for MousePointer<'a>
Source§fn clone(&self) -> MousePointer<'a>
fn clone(&self) -> MousePointer<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for MousePointer<'a>
impl<'a> RefUnwindSafe for MousePointer<'a>
impl<'a> Send for MousePointer<'a>
impl<'a> Sync for MousePointer<'a>
impl<'a> Unpin for MousePointer<'a>
impl<'a> UnwindSafe for MousePointer<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more