FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    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<TabViewEqualWidthPanel>
    

    Returns a strong reference to this object.

    Source

    min_item_width_property

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

    Defines the MinItemWidth property.

    Source

    max_item_width_property

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

    Defines the MaxItemWidth property.

    Source

    construct

    fn construct() -> Self
    

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

    Source

    new

    fn new() -> Ref<Self>
    

    Creates a panel of tabs of equal width.

    Source

    min_item_width

    fn min_item_width(self: &Self) -> f64
    

    The minimum width of a child (TabViewItemMinWidth).

    Source

    set_min_item_width

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

    Source

    max_item_width

    fn max_item_width(self: &Self) -> f64
    

    The maximum width of a child (TabViewItemMaxWidth).

    Source

    set_max_item_width

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

    Source

    item_width

    fn item_width(self: &Self) -> f64
    

    The width of every child, as the last measure computed it.

    Source

    Trait implementations

    Availability

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