Struct BlinkCursor

Source
pub struct BlinkCursor<CB: CursorRedrawCb> {
    state: Arc<UiMutex<State<CB>>>,
    mode_info: Option<ModeInfo>,
}

Fields§

§state: Arc<UiMutex<State<CB>>>§mode_info: Option<ModeInfo>

Implementations§

Source§

impl<CB: CursorRedrawCb + 'static> BlinkCursor<CB>

Source

pub fn new(redraw_cb: Weak<UiMutex<CB>>) -> Self

Source

pub fn set_mode_info(&mut self, mode_info: Option<ModeInfo>)

Source

pub fn start(&mut self)

Source

pub fn reset_state(&mut self)

Source

pub fn enter_focus(&mut self)

Source

pub fn leave_focus(&mut self)

Source

pub fn busy_on(&mut self)

Source

pub fn busy_off(&mut self)

Trait Implementations§

Source§

impl<CB: CursorRedrawCb> Cursor for BlinkCursor<CB>

Source§

fn draw( &self, ctx: &Context, font_ctx: &Context, line_y: f64, double_width: bool, hl: &HighlightMap, ) -> f64

return cursor current alpha value
Source§

fn is_visible(&self) -> bool

Source§

fn mode_info(&self) -> Option<&ModeInfo>

Source§

impl<CB: CursorRedrawCb> Drop for BlinkCursor<CB>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<CB> Freeze for BlinkCursor<CB>

§

impl<CB> !RefUnwindSafe for BlinkCursor<CB>

§

impl<CB> Send for BlinkCursor<CB>

§

impl<CB> Sync for BlinkCursor<CB>

§

impl<CB> Unpin for BlinkCursor<CB>

§

impl<CB> !UnwindSafe for BlinkCursor<CB>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.