TabViewEqualWidthPanel
struct · ferroui-themes-material · v0.5.0
struct TabViewEqualWidthPanel
Lays out its children side by side, every one as wide as the others: the width the panel has
for them divided by their number, but not less than MinItemWidth and not more than
MaxItemWidth (TabView's TabWidthMode="Equal"). The children shrink with the width of the
panel down to the minimum; more children than fit at the minimum make the panel as wide as
they are, so that the scroll viewer around it scrolls them.
The width the panel has is the width it is measured with. In a scroll viewer that scrolls horizontally, which measures its content with an infinite width, it is the width the viewport offers the panel: the viewport less the padding of the scroll content presenter and less the width the other content of the scroll viewer takes beside the panel (the header and the footer of the strip, its padding), with the room the scroll buttons take while the content overflows given back: TabView computes the width of its tabs from the width of its strip without the scroll buttons, and hides them when the tabs fit. A new width of the viewport measures the panel again. Without a width (an infinite one, or a viewport that has not been laid out yet) every child has the maximum width, as in TabView. Hidden children are left out.
The children are arranged from the left; with FlowDirection right to left the framework
mirrors the panel, so that the first child is at the right, as the tabs of TabView are.
Members
TYPEto_refmin_item_width_propertymax_item_width_propertyconstructnewmin_item_widthset_min_item_widthmax_item_widthset_max_item_widthitem_width
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<TabViewEqualWidthPanel>
Returns a strong reference to this object.
min_item_width_property
fn min_item_width_property() -> &'static StyledProperty<f64>
Defines the MinItemWidth property.
max_item_width_property
fn max_item_width_property() -> &'static StyledProperty<f64>
Defines the MaxItemWidth property.
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
new
fn new() -> Ref<Self>
Creates a panel of tabs of equal width.
min_item_width
fn min_item_width(self: &Self) -> f64
The minimum width of a child (TabViewItemMinWidth).
set_min_item_width
fn set_min_item_width(self: &Self, value: f64)
max_item_width
fn max_item_width(self: &Self) -> f64
The maximum width of a child (TabViewItemMaxWidth).
set_max_item_width
fn set_max_item_width(self: &Self, value: f64)
item_width
fn item_width(self: &Self) -> f64
The width of every child, as the last measure computed it.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyInputElementImplExtInteractiveImplExtLayoutableImplExtFerroObjectImplExtStyledElementImplExtClassDefaultsVisualImplExtErasedDestructorIntoEitherCastableFrom<ST, Uninit, Uninit>CastableFrom<ST, Initialized, Initialized>Read<Exclusive, BecauseExclusive>ControlImplExtPanelImplExtDerefUpcast<T>Upcast<TabViewEqualWidthPanel>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleFerroObjectImplStyledElementImplInteractiveImplInputElementImplControlImplPanelImplLayoutableImplVisualImplINavigableContainer
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.