pub struct VSplit<'a, Message = ()> { /* private fields */ }
Expand description
VSplit will split the area vertically. It will
- Count the total height(basis) of the split items it contains
- Judge if the current height is enough or not for the split items
- shrink/grow the split items according to their factors / (total factors)
- If still not enough room, the last one(s) would be set height 0
Implementations
Trait Implementations
sourceimpl<'a, Message> Draw for VSplit<'a, Message>
impl<'a, Message> Draw for VSplit<'a, Message>
fn draw(&self, canvas: &mut dyn Canvas) -> DrawResult<()>
fn draw_mut(&mut self, canvas: &mut dyn Canvas) -> DrawResult<()>
sourceimpl<'a, Message> Widget<Message> for VSplit<'a, Message>
impl<'a, Message> Widget<Message> for VSplit<'a, Message>
sourcefn size_hint(&self) -> (Option<usize>, Option<usize>)
fn size_hint(&self) -> (Option<usize>, Option<usize>)
the (width, height) of the content
it will be the hint for layouts to calculate the final size Read more
sourcefn on_event(&self, event: Event, rect: Rectangle) -> Vec<Message>
fn on_event(&self, event: Event, rect: Rectangle) -> Vec<Message>
given a key event, emit zero or more messages
typical usage is the mouse click event where containers would pass the event down
to their children. Read more
sourcefn on_event_mut(&mut self, event: Event, rect: Rectangle) -> Vec<Message>
fn on_event_mut(&mut self, event: Event, rect: Rectangle) -> Vec<Message>
same as
on_event
except that the self reference is mutableAuto Trait Implementations
impl<'a, Message = ()> !RefUnwindSafe for VSplit<'a, Message>
impl<'a, Message = ()> !Send for VSplit<'a, Message>
impl<'a, Message = ()> !Sync for VSplit<'a, Message>
impl<'a, Message> Unpin for VSplit<'a, Message>
impl<'a, Message = ()> !UnwindSafe for VSplit<'a, Message>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more