Enum vizia_core::views::TextEvent
source · pub enum TextEvent {
}
Expand description
Events for modifying a textbox.
Variants§
InsertText(String)
Insert a string of text into the textbox.
Clear
Reset the text of the textbox to the bound data.
DeleteText(Movement)
Delete a section of text, determined by the Movement
.
MoveCursor(Movement, bool)
Move the cursor and selection.
SelectAll
Select all text.
SelectWord
Select the word at the current cursor position.
SelectParagraph
Select the paragraph at the current cursor position.
StartEdit
Toggle the textbox to allow text input.
EndEdit
Toggle the textbox to not allow text input.
Submit(bool)
Trigger the on_submit
callback with the current text.
Hit(f32, f32, bool)
Specify the ‘hit’ position of the mouse cursor.
Drag(f32, f32)
Specify the ‘drag’ position of the mouse cursor.
Scroll(f32, f32)
Specify the scroll offset of the textbox.
Copy
Copy the textbox buffer to the clipboard.
Paste
Paste the clipboard buffer into the textbox.
Cut
Cut the textbox text and place it in the clipboard.
SetPlaceholder(String)
Set the placeholder text of the textbox.
Blur
Trigger the on_blur
callback.
ToggleCaret
Auto Trait Implementations§
impl Freeze for TextEvent
impl RefUnwindSafe for TextEvent
impl Send for TextEvent
impl Sync for TextEvent
impl Unpin for TextEvent
impl UnwindSafe for TextEvent
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.