FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    StackPanel

    struct · ferroui-controls · v0.5.0

    struct StackPanel
    

    A panel which lays out its children horizontally or vertically.

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

    Returns a strong reference to this object.

    Source

    arrange_child

    fn arrange_child(self: &Self, child: &Ref<Control>, rect: Rect, panel_size: Size, orientation: Orientation)
    

    Arranges a single child in the slot computed by the panel.

    Source

    get_control_in_direction

    fn get_control_in_direction(self: &Self, direction: NavigationDirection, from: Option<&Ref<Control>>) -> Option<Ref<InputElement>>
    

    Gets the next control in the specified direction.

    from is the control from which movement begins.

    Source

    spacing_property

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

    Defines the Spacing property.

    Source

    orientation_property

    fn orientation_property() -> &'static StyledProperty<Orientation>
    

    Defines the Orientation property.

    Source

    are_horizontal_snap_points_regular_property

    fn are_horizontal_snap_points_regular_property() -> &'static StyledProperty<bool>
    

    Defines the AreHorizontalSnapPointsRegular property.

    Source

    are_vertical_snap_points_regular_property

    fn are_vertical_snap_points_regular_property() -> &'static StyledProperty<bool>
    

    Defines the AreVerticalSnapPointsRegular property.

    Source

    horizontal_snap_points_changed_event

    fn horizontal_snap_points_changed_event() -> &'static RoutedEvent<RoutedEventArgs>
    

    Defines the HorizontalSnapPointsChanged event.

    Source

    vertical_snap_points_changed_event

    fn vertical_snap_points_changed_event() -> &'static RoutedEvent<RoutedEventArgs>
    

    Defines the VerticalSnapPointsChanged event.

    Source

    construct

    fn construct() -> Self
    

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

    Source

    new

    fn new() -> Ref<Self>
    

    Source

    spacing

    fn spacing(self: &Self) -> f64
    

    The size of the spacing to place between child controls.

    Source

    set_spacing

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

    Source

    orientation

    fn orientation(self: &Self) -> Orientation
    

    The orientation in which child controls will be layed out.

    Source

    set_orientation

    fn set_orientation(self: &Self, value: Orientation)
    

    Source

    horizontal_snap_points_changed

    fn horizontal_snap_points_changed(self: &Self, handler: impl Fn(&Interactive, &RoutedEventArgs) -> () + 'static) -> RoutedEventHandlerToken
    

    Occurs when the measurements for horizontal snap points change.

    Source

    vertical_snap_points_changed

    fn vertical_snap_points_changed(self: &Self, handler: impl Fn(&Interactive, &RoutedEventArgs) -> () + 'static) -> RoutedEventHandlerToken
    

    Occurs when the measurements for vertical snap points change.

    Source

    are_horizontal_snap_points_regular

    fn are_horizontal_snap_points_regular(self: &Self) -> bool
    

    Whether the horizontal snap points for the panel are equidistant from each other.

    Source

    set_are_horizontal_snap_points_regular

    fn set_are_horizontal_snap_points_regular(self: &Self, value: bool)
    

    Source

    are_vertical_snap_points_regular

    fn are_vertical_snap_points_regular(self: &Self) -> bool
    

    Whether the vertical snap points for the panel are equidistant from each other.

    Source

    set_are_vertical_snap_points_regular

    fn set_are_vertical_snap_points_regular(self: &Self, value: bool)
    

    Source

    get_irregular_snap_points

    fn get_irregular_snap_points(self: &Self, orientation: Orientation, snap_points_alignment: SnapPointsAlignment) -> Vec<f64>
    

    Returns the set of distances between irregular snap points for a specified orientation and alignment.

    Panics if the snap points of the orientation are regular.

    Source

    get_regular_snap_points

    fn get_regular_snap_points(self: &Self, _orientation: Orientation, snap_points_alignment: SnapPointsAlignment) -> (f64, f64)
    

    Gets the distance between regular snap points for a specified orientation and alignment, and the offset of the first snap point.

    Panics if the snap points of the panel's orientation are not regular.

    Source

    Trait implementations

    Availability

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