pub struct Column<T: WidgetList> {
pub children: T,
pub space_between: f64,
pub main_axis_size: MainAxisSize,
pub main_axis_alignment: MainAxisAlignment,
pub cross_axis_size: CrossAxisSize,
pub cross_axis_alignment: CrossAxisAlignment,
}Fields§
§children: T§space_between: f64§main_axis_size: MainAxisSize§main_axis_alignment: MainAxisAlignment§cross_axis_size: CrossAxisSize§cross_axis_alignment: CrossAxisAlignmentImplementations§
Source§impl<WidgetList_: WidgetList> Column<WidgetList_>
impl<WidgetList_: WidgetList> Column<WidgetList_>
Sourcepub fn children(self, children: impl WidgetList) -> Column<impl WidgetList>
pub fn children(self, children: impl WidgetList) -> Column<impl WidgetList>
List of children widgets to be laid out by the Column.
§Note
See WidgetList for all the types that you can use as children.
Sourcepub fn main_axis_size(self, size: MainAxisSize) -> Self
pub fn main_axis_size(self, size: MainAxisSize) -> Self
Whether Column should take full available height or only the minimum to fit children.
§Note
The default is MainAxisSize::Min.
If one of your children is flexible, MainAxisSize of this Column will be the same
as if it was set to MainAxisSize::Max.
Sourcepub fn main_axis_alignment(self, alignment: MainAxisAlignment) -> Self
pub fn main_axis_alignment(self, alignment: MainAxisAlignment) -> Self
Specifies how Column should layout its children on the vertical axis.
§Note
The default is MainAxisAlignment::Start.
Sourcepub fn cross_axis_size(self, size: CrossAxisSize) -> Self
pub fn cross_axis_size(self, size: CrossAxisSize) -> Self
Whether Column should take full available width or only the minimum to fit children.
§Note
The default is CrossAxisSize::Min.
Sourcepub fn cross_axis_alignment(self, alignment: CrossAxisAlignment) -> Self
pub fn cross_axis_alignment(self, alignment: CrossAxisAlignment) -> Self
Specifies how Column should layout its children on the horizontal axis.
§Note
The default is MainAxisAlignment::Start.
Sourcepub fn space_between(self, amount: f64) -> Self
pub fn space_between(self, amount: f64) -> Self
Trait Implementations§
Source§impl<T: WidgetList> CheapEq for Column<T>
impl<T: WidgetList> CheapEq for Column<T>
Source§impl<T: WidgetList> MultiChildWidget for Column<T>
impl<T: WidgetList> MultiChildWidget for Column<T>
fn build<'w>(&'w self, _: BuildContext<'w, Self>) -> Vec<Self::Widget<'w>>
fn layout(&self, ctx: RenderContext<'_, Self>, constraints: Constraints) -> Size
fn paint( &self, ctx: RenderContext<'_, Self>, canvas: &mut PaintContext<'_>, offset: &Offset, )
Source§impl<T: WidgetList> RenderState for Column<T>
impl<T: WidgetList> RenderState for Column<T>
type State = ColumnRenderState
fn create_state(&self) -> Self::State
Source§impl<T: WidgetList> Widget for Column<T>
impl<T: WidgetList> Widget for Column<T>
Source§fn unique_type(&self) -> TypeId
fn unique_type(&self) -> TypeId
Implementation should return the same unique TypeId for given structure definition,
even if that structure contains generic parameters. This is used to preserve state
between generic widgets.
fn kind<'frui>(&'frui self) -> WidgetKind<'_>
Source§impl<T: WidgetList> WidgetDerive for Column<T>
impl<T: WidgetList> WidgetDerive for Column<T>
Auto Trait Implementations§
impl<T> Freeze for Column<T>where
T: Freeze,
impl<T> Immutable for Column<T>where
T: Immutable,
impl<T> RefUnwindSafe for Column<T>where
T: RefUnwindSafe,
impl<T> Send for Column<T>where
T: Send,
impl<T> Sync for Column<T>where
T: Sync,
impl<T> Unpin for Column<T>where
T: Unpin,
impl<T> UnwindSafe for Column<T>where
T: UnwindSafe,
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