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
Members
TYPEto_refdirection_propertyjustify_content_propertyalign_items_propertyalign_content_propertywrap_propertycolumn_spacing_propertyrow_spacing_propertyconstructnewdirectionset_directionjustify_contentset_justify_contentalign_itemsset_align_itemsalign_contentset_align_contentwrapset_wrapcolumn_spacingset_column_spacingrow_spacingset_row_spacing
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<FlexPanel>
Returns a strong reference to this object.
direction_property
fn direction_property() -> &'static StyledProperty<FlexDirection>
Defines the Direction property.
justify_content_property
fn justify_content_property() -> &'static StyledProperty<FlexJustifyContent>
Defines the JustifyContent property.
align_items_property
fn align_items_property() -> &'static StyledProperty<FlexAlignItems>
Defines the AlignItems property.
align_content_property
fn align_content_property() -> &'static StyledProperty<FlexAlignContent>
Defines the AlignContent property.
wrap_property
fn wrap_property() -> &'static StyledProperty<FlexWrap>
Defines the Wrap property.
column_spacing_property
fn column_spacing_property() -> &'static StyledProperty<f64>
Defines the ColumnSpacing property.
row_spacing_property
fn row_spacing_property() -> &'static StyledProperty<f64>
Defines the RowSpacing property.
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
new
fn new() -> Ref<Self>
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.
set_direction
fn set_direction(self: &Self, value: FlexDirection)
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.
set_justify_content
fn set_justify_content(self: &Self, value: FlexJustifyContent)
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.
set_align_items
fn set_align_items(self: &Self, value: FlexAlignItems)
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.
set_align_content
fn set_align_content(self: &Self, value: FlexAlignContent)
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.
set_wrap
fn set_wrap(self: &Self, value: FlexWrap)
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.
set_column_spacing
fn set_column_spacing(self: &Self, value: f64)
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.
set_row_spacing
fn set_row_spacing(self: &Self, value: f64)
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeControlImplExtPanelImplExtBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyInputElementImplExtInteractiveImplExtLayoutableImplExtFerroObjectImplExtStyledElementImplExtClassDefaultsVisualImplExtErasedDestructorIntoEitherDerefUpcast<T>Upcast<FlexPanel>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleStyledElementImplVisualImplInteractiveImplInputElementImplControlImplFerroObjectImplLayoutableImplPanelImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.