FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    Flex

    struct · ferroui-controls · v0.5.0

    struct Flex
    

    Provides attached properties for controlling the layout behavior of child elements within a FlexPanel.

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this type.

    Source

    align_self_property

    fn align_self_property() -> &'static AttachedProperty<Option<FlexAlignItems>>
    

    Defines an attached property to control the cross-axis alignment of a specific child in a flex layout.

    Source

    order_property

    fn order_property() -> &'static AttachedProperty<i32>
    

    Defines an attached property to control the order of a specific child in a flex layout.

    Source

    basis_property

    fn basis_property() -> &'static AttachedProperty<FlexBasis>
    

    Defines an attached property to control the initial main-axis size of a specific child in a flex layout.

    Source

    shrink_property

    fn shrink_property() -> &'static AttachedProperty<f64>
    

    Defines an attached property to control the factor by which a specific child can shrink along the main-axis in a flex layout.

    Source

    grow_property

    fn grow_property() -> &'static AttachedProperty<f64>
    

    Defines an attached property to control the factor by which a specific child can grow along the main-axis in a flex layout.

    Source

    get_align_self

    fn get_align_self(layoutable: &Layoutable) -> Option<FlexAlignItems>
    

    Gets the cross-axis alignment override for a child item in a FlexPanel.

    This property is used to override the AlignItems property of the panel for a specific child. When omitted, AlignItems is not overridden. Equivalent to the CSS align-self property.

    Source

    set_align_self

    fn set_align_self(layoutable: &Layoutable, value: Option<FlexAlignItems>)
    

    Sets the cross-axis alignment override for a child item in a FlexPanel.

    This property is used to override the AlignItems property of the panel for a specific child. When omitted, AlignItems is not overridden. Equivalent to the CSS align-self property.

    Source

    get_order

    fn get_order(layoutable: &Layoutable) -> i32
    

    Retrieves the order in which a child item appears within the FlexPanel.

    A lower order value means the item will be positioned earlier within the container. Items with the same order value are laid out in their source document order. When omitted, it is set to 0. Equivalent to the CSS order property.

    Source

    set_order

    fn set_order(layoutable: &Layoutable, value: i32)
    

    Sets the order in which a child item appears within the FlexPanel.

    A lower order value means the item will be positioned earlier within the container. Items with the same order value are laid out in their source document order. When omitted, it is set to 0. Equivalent to the CSS order property.

    Source

    get_basis

    fn get_basis(layoutable: &Layoutable) -> FlexBasis
    

    Gets the initial size along the main-axis of an item in a FlexPanel, before free space is distributed according to the flex factors.

    Either automatic size, a fixed length, or a percentage of the container's size. When omitted, it is set to FlexBasis::AUTO. Equivalent to the CSS flex-basis property.

    Source

    set_basis

    fn set_basis(layoutable: &Layoutable, value: FlexBasis)
    

    Sets the initial size along the main-axis of an item in a FlexPanel, before free space is distributed according to the flex factors.

    Either automatic size, a fixed length, or a percentage of the container's size. When omitted, it is set to FlexBasis::AUTO. Equivalent to the CSS flex-basis property.

    Source

    get_shrink

    fn get_shrink(layoutable: &Layoutable) -> f64
    

    Gets the factor by which an item can shrink along the main-axis, relative to other items in a FlexPanel.

    When omitted, it is set to 1. Equivalent to the CSS flex-shrink property.

    Source

    set_shrink

    fn set_shrink(layoutable: &Layoutable, value: f64)
    

    Sets the factor by which an item can shrink along the main-axis, relative to other items in a FlexPanel.

    When omitted, it is set to 1. Equivalent to the CSS flex-shrink property.

    Source

    get_grow

    fn get_grow(layoutable: &Layoutable) -> f64
    

    Gets the factor by which an item can grow along the main-axis, relative to other items in a FlexPanel.

    When omitted, it is set to 0. Equivalent to the CSS flex-grow property.

    Source

    set_grow

    fn set_grow(layoutable: &Layoutable, value: f64)
    

    Sets the factor by which an item can grow along the main-axis, relative to other items in a FlexPanel.

    When omitted, it is set to 0. Equivalent to the CSS flex-grow property.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ClassDefaults
    • ErasedDestructor
    • IntoEither
    • StaticType

    Availability

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