Flex
struct · ferroui-controls · v0.5.0
struct Flex
Provides attached properties for controlling the layout behavior of child
elements within a FlexPanel.
Members
TYPEalign_self_propertyorder_propertybasis_propertyshrink_propertygrow_propertyget_align_selfset_align_selfget_orderset_orderget_basisset_basisget_shrinkset_shrinkget_growset_grow
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this type.
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.
order_property
fn order_property() -> &'static AttachedProperty<i32>
Defines an attached property to control the order of a specific child in a flex layout.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyClassDefaultsErasedDestructorIntoEitherStaticType
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.