Cursor

Trait Cursor 

Source
pub trait Cursor: Clone + Debug {
    type TextHandle: 'static;
    type EventHandle: 'static;

    // Required methods
    fn from_text_handle(handle: &Self::TextHandle) -> Self;
    fn empty(&mut self);
    fn text(&mut self, text: &str) -> Self::TextHandle;
    fn update_text(&mut self, text: &str);
    fn on_event(&mut self, event: On) -> Self::EventHandle;
    fn enter_children(&mut self);
    fn exit_children(&mut self);
    fn next_sibling(&mut self);
    fn remove(&mut self);
    fn enter_diff(&mut self);
    fn exit_diff(&mut self);
    fn replace(&mut self, func: impl FnOnce(&mut Self));
}
Expand description

A cursor used to traverse the UI tree on a given platform.

Required Associated Types§

Source

type TextHandle: 'static

Source

type EventHandle: 'static

Required Methods§

Source

fn from_text_handle(handle: &Self::TextHandle) -> Self

Source

fn empty(&mut self)

Source

fn text(&mut self, text: &str) -> Self::TextHandle

Source

fn update_text(&mut self, text: &str)

Source

fn on_event(&mut self, event: On) -> Self::EventHandle

Source

fn enter_children(&mut self)

Source

fn exit_children(&mut self)

Source

fn next_sibling(&mut self)

Source

fn remove(&mut self)

Source

fn enter_diff(&mut self)

Source

fn exit_diff(&mut self)

Source

fn replace(&mut self, func: impl FnOnce(&mut Self))

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§