pub struct State { /* private fields */ }Expand description
The internal state of an Editor.
Implementations§
Source§impl State
impl State
Sourcepub fn update<Message>(
&mut self,
editor: &impl Editor,
event: &Event,
bounds: Rectangle,
padding: Padding,
cursor: Cursor,
key_binding: impl Fn(KeyPress) -> Option<Binding<Message>>,
) -> Option<Update<Message>>
pub fn update<Message>( &mut self, editor: &impl Editor, event: &Event, bounds: Rectangle, padding: Padding, cursor: Cursor, key_binding: impl Fn(KeyPress) -> Option<Binding<Message>>, ) -> Option<Update<Message>>
Sourcepub fn input_method<'a>(
&'a self,
editor: &impl Editor,
position: Point,
) -> InputMethod<&'a str>
pub fn input_method<'a>( &'a self, editor: &impl Editor, position: Point, ) -> InputMethod<&'a str>
Returns the current InputMethod of the State for the given Editor.
Sourcepub fn draw<Renderer: Renderer>(
&self,
editor: &Renderer::Editor,
renderer: &mut Renderer,
position: Point,
clip_bounds: Rectangle,
style: Style,
)
pub fn draw<Renderer: Renderer>( &self, editor: &Renderer::Editor, renderer: &mut Renderer, position: Point, clip_bounds: Rectangle, style: Style, )
Sourcepub fn is_cursor_visible(&self) -> bool
pub fn is_cursor_visible(&self) -> bool
Returns whether the cursor of the Editor is visible.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnsafeUnpin for State
impl UnwindSafe for State
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