pub struct Column { /* private fields */ }Expand description
Vertical flex container. Children are arranged top-to-bottom.
Expanded children automatically receive the leftover vertical space.
Implementations§
Source§impl Column
impl Column
pub fn new() -> Self
pub fn spacing(self, s: f32) -> Self
pub fn padding(self, p: EdgeInsets) -> Self
pub fn main_axis_alignment(self, a: MainAxisAlignment) -> Self
pub fn cross_axis_alignment(self, a: CrossAxisAlignment) -> Self
pub fn child(self, w: impl Widget + 'static) -> Self
pub fn children(self, ws: Vec<BoxedWidget>) -> Self
Sourcepub fn scrollable(self) -> ScrollView
pub fn scrollable(self) -> ScrollView
Wrap this flex container in a ScrollView scrolling vertically (D101: position is implicit per-node state — zero wiring). Expanded children are ignored on the unbounded scroll axis.
Trait Implementations§
Source§impl Widget for Column
impl Widget for Column
Source§fn layout(&self, ctx: &LayoutCtx<'_>) -> Size
fn layout(&self, ctx: &LayoutCtx<'_>) -> Size
Measure under
ctx.constraints and return a size within them. Read moreSource§fn children(&self) -> Children<'_>
fn children(&self) -> Children<'_>
Declare this widget’s children. Drives every default below.
Source§fn flex_factor(&self) -> f32
fn flex_factor(&self) -> f32
Flex weight inside Row/Column. Wrappers are transparent by default.
Auto Trait Implementations§
impl !Freeze for Column
impl !RefUnwindSafe for Column
impl !UnwindSafe for Column
impl Send for Column
impl Sync for Column
impl Unpin for Column
impl UnsafeUnpin for Column
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
Source§impl<W> FocusApi for W
impl<W> FocusApi for W
Source§fn focus_node(self, node: FocusNode) -> WithFocus<Self>
fn focus_node(self, node: FocusNode) -> WithFocus<Self>
Attach a focus node. This enables focus-ring rendering and explicit
neighbor wiring.