FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    FlexPanel

    struct · ferroui-controls · v0.5.0

    struct FlexPanel
    

    A panel that arranges child controls using CSS FlexBox principles. It organizes child items in one or more lines along a main-axis (either row or column) and provides advanced control over their sizing and layout.

    See the CSS FlexBox specification: https://www.w3.org/TR/css-flexbox-1

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this class.

    Source

    to_ref

    fn to_ref(self: &Self) -> $crate::Ref<FlexPanel>
    

    Returns a strong reference to this object.

    Source

    direction_property

    fn direction_property() -> &'static StyledProperty<FlexDirection>
    

    Defines the Direction property.

    Source

    justify_content_property

    fn justify_content_property() -> &'static StyledProperty<FlexJustifyContent>
    

    Defines the JustifyContent property.

    Source

    align_items_property

    fn align_items_property() -> &'static StyledProperty<FlexAlignItems>
    

    Defines the AlignItems property.

    Source

    align_content_property

    fn align_content_property() -> &'static StyledProperty<FlexAlignContent>
    

    Defines the AlignContent property.

    Source

    wrap_property

    fn wrap_property() -> &'static StyledProperty<FlexWrap>
    

    Defines the Wrap property.

    Source

    column_spacing_property

    fn column_spacing_property() -> &'static StyledProperty<f64>
    

    Defines the ColumnSpacing property.

    Source

    row_spacing_property

    fn row_spacing_property() -> &'static StyledProperty<f64>
    

    Defines the RowSpacing property.

    Source

    construct

    fn construct() -> Self
    

    Creates the class data; see ferroui_base::FerroObject::construct.

    Source

    new

    fn new() -> Ref<Self>
    

    Source

    direction

    fn direction(self: &Self) -> FlexDirection
    

    The direction of the panel's main-axis, determining the orientation in which child controls are laid out.

    The default value is FlexDirection::Row. Equivalent to the CSS flex-direction property.

    Source

    set_direction

    fn set_direction(self: &Self, value: FlexDirection)
    

    Source

    justify_content

    fn justify_content(self: &Self) -> FlexJustifyContent
    

    The main-axis alignment of child items inside a line of the panel. Typically used to distribute extra free space leftover after flexible lengths and margins have been resolved.

    The default value is FlexJustifyContent::FlexStart. Equivalent to the CSS justify-content property.

    Source

    set_justify_content

    fn set_justify_content(self: &Self, value: FlexJustifyContent)
    

    Source

    align_items

    fn align_items(self: &Self) -> FlexAlignItems
    

    The cross-axis alignment of all child items inside a line of the panel. Similar to justify_content, but in the perpendicular direction.

    The default value is FlexAlignItems::Stretch. Equivalent to the CSS align-items property.

    Source

    set_align_items

    fn set_align_items(self: &Self, value: FlexAlignItems)
    

    Source

    align_content

    fn align_content(self: &Self) -> FlexAlignContent
    

    The cross-axis alignment of lines in the panel when there is extra space. Similar to align_items, but for entire lines. The wrap property set to FlexWrap::Wrap mode allows controls to be arranged on multiple lines.

    The default value is FlexAlignContent::Stretch. Equivalent to the CSS align-content property.

    Source

    set_align_content

    fn set_align_content(self: &Self, value: FlexAlignContent)
    

    Source

    wrap

    fn wrap(self: &Self) -> FlexWrap
    

    The wrap mode, controlling whether the panel is single-line or multi-line. Additionally, it determines the cross-axis stacking direction for new lines.

    The default value is FlexWrap::NoWrap. Equivalent to the CSS flex-wrap property.

    Source

    set_wrap

    fn set_wrap(self: &Self, value: FlexWrap)
    

    Source

    column_spacing

    fn column_spacing(self: &Self) -> f64
    

    The minimum horizontal spacing between child items or lines, depending on the main-axis direction of the panel.

    The default value is 0. Similar to the CSS column-gap property.

    Source

    set_column_spacing

    fn set_column_spacing(self: &Self, value: f64)
    

    Source

    row_spacing

    fn row_spacing(self: &Self) -> f64
    

    The minimum vertical spacing between child items or lines, depending on the main-axis direction of the panel.

    The default value is 0. Similar to the CSS row-gap property.

    Source

    set_row_spacing

    fn set_row_spacing(self: &Self, value: f64)
    

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.