Struct intuitive::components::VStack
source · pub struct VStack<const N: usize> {
pub flex: FlexArray<N>,
pub children: Children<N>,
pub on_key: KeyHandler,
pub on_mouse: MouseHandler,
}
Expand description
A component that renders a vertical stack of components.
The flex
argument specifies the amount of space allocated to each child, similar
to the flex
css property. See the FlexArray
documentation for details.
An example usage would be,
#[component(Root)]
fn render() {
render! {
VStack(flex: [1, 2, 3]) {
Section(title: "Top")
Section(title: "Middle")
Section(title: "Bottom")
}
}
}
Will render the following:
Fields§
§flex: FlexArray<N>
§children: Children<N>
§on_key: KeyHandler
§on_mouse: MouseHandler
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<const N: usize> !RefUnwindSafe for Stack<N>
impl<const N: usize> Send for Stack<N>
impl<const N: usize> Sync for Stack<N>
impl<const N: usize> Unpin for Stack<N>
impl<const N: usize> !UnwindSafe for Stack<N>
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