Struct kas_widgets::EditBox [−][src]
Expand description
A text-edit box
This is just a wrapper around EditField
adding a frame.
Implementations
Set an EditGuard
Technically, this consumes self
and reconstructs another EditBox
with a different parameterisation.
This method calls EditGuard::update
after applying guard
to self
and discards any message emitted.
Set a guard function, called on activation
The closure f
is called when the EditBox
is activated (when the
“enter” key is pressed).
Its result, if not None
, is the event handler’s response.
This method is a parametisation of EditBox::with_guard
. Any guard
previously assigned to the EditBox
will be replaced.
Set a guard function, called on activation and input-focus lost
The closure f
is called when the EditBox
is activated (when the
“enter” key is pressed) and when keyboard focus is lost.
Its result, if not None
, is the event handler’s response.
This method is a parametisation of EditBox::with_guard
. Any guard
previously assigned to the EditBox
will be replaced.
Set a guard function, called on edit
The closure f
is called when the EditBox
is edited by the user.
Its result, if not None
, is the event handler’s response.
This method is a parametisation of EditBox::with_guard
. Any guard
previously assigned to the EditBox
will be replaced.
Set a guard function, called on update
The closure f
is called when the EditBox
is updated (by the user or
programmatically). It is also called immediately by this method.
This method is a parametisation of EditBox::with_guard
. Any guard
previously assigned to the EditBox
will be replaced.
Get whether this EditBox
is editable
Set whether this EditBox
is editable
Set whether this EditBox
shows multiple text lines
Get whether the widget currently has keyboard input focus
Set the error state
When true, the input field’s background is drawn red.
Methods from Deref<Target = EditField<G>>
Get whether this EditField
is editable
Set whether this EditField
is editable
Get whether the widget currently has keyboard input focus
Set the error state
When true, the input field’s background is drawn red.
Trait Implementations
Get the number of child widgets
Get a reference to a child widget by index, or None
if the index is
out of bounds. Read more
Mutable variant of get Read more
Record first identifier Read more
Check whether id
is a descendant Read more
Find the child which is an ancestor of this id
, if any Read more
Find the leaf (lowest descendant) with this id
, if any Read more
Find the leaf (lowest descendant) with this id
, if any Read more
Walk through all widgets, calling f
once on each. Read more
Walk through all widgets, calling f
once on each. Read more
Get self as type Any
(mutable)
Get the name of the widget struct
Erase type
Erase type
Get whether the widget is disabled
Set the disabled state of a widget Read more
Set disabled state (chaining) Read more
Construct InputState
Read more
Auto Trait Implementations
impl<G> RefUnwindSafe for EditBox<G> where
G: RefUnwindSafe,
impl<G> UnwindSafe for EditBox<G> where
G: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn cast_trunc(self) -> T
pub fn cast_trunc(self) -> T
Cast to integer, truncating Read more
pub fn cast_nearest(self) -> T
pub fn cast_nearest(self) -> T
Cast to the nearest integer Read more
pub fn cast_floor(self) -> T
pub fn cast_floor(self) -> T
Cast the floor to an integer Read more
pub fn try_cast_trunc(self) -> Result<T, Error>
pub fn try_cast_trunc(self) -> Result<T, Error>
Try converting to integer with truncation Read more
pub fn try_cast_nearest(self) -> Result<T, Error>
pub fn try_cast_nearest(self) -> Result<T, Error>
Try converting to the nearest integer Read more
pub fn try_cast_floor(self) -> Result<T, Error>
pub fn try_cast_floor(self) -> Result<T, Error>
Try converting the floor to an integer Read more
pub fn try_cast_ceil(self) -> Result<T, Error>
pub fn try_cast_ceil(self) -> Result<T, Error>
Try convert the ceiling to an integer Read more