Struct kas_widgets::Splitter [−][src]
pub struct Splitter<D: Directional, W: Widget> { /* fields omitted */ }
Expand description
A resizable row/column widget
Similar to crate::List
but with draggable handles between items.
Implementations
Construct a new instance
This constructor is available where the direction is determined by the
type: for D: Directional + Default
. In other cases, use
Splitter::new_with_direction
.
Construct a new instance with explicit direction
Returns the number of elements the vector can hold without reallocating.
Reserves capacity for at least additional
more elements to be inserted
into the list. See documentation of Vec::reserve
.
Remove all child widgets
Triggers a reconfigure action if any widget is removed.
Append a child widget
Triggers a reconfigure action.
Remove the last child widget
Returns None
if there are no children. Otherwise, this
triggers a reconfigure before the next draw operation.
Triggers a reconfigure action if any widget is removed.
Removes the child widget at position index
Panics if index
is out of bounds.
Triggers a reconfigure action.
Append child widgets from an iterator
Triggers a reconfigure action if any widgets are added.
Resize, using the given closure to construct new widgets
Triggers a reconfigure action.
Retain only widgets satisfying predicate f
See documentation of Vec::retain
.
Triggers a reconfigure action if any widgets are removed.
Trait Implementations
Record first identifier Read more
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
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<D, W> RefUnwindSafe for Splitter<D, W> where
D: RefUnwindSafe,
W: RefUnwindSafe,
impl<D, W> UnwindSafe for Splitter<D, W> where
D: UnwindSafe,
W: 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