StackPanel
struct · ferroui-controls · v0.5.0
struct StackPanel
A panel which lays out its children horizontally or vertically.
Members
TYPEto_refarrange_childget_control_in_directionspacing_propertyorientation_propertyare_horizontal_snap_points_regular_propertyare_vertical_snap_points_regular_propertyhorizontal_snap_points_changed_eventvertical_snap_points_changed_eventconstructnewspacingset_spacingorientationset_orientationhorizontal_snap_points_changedvertical_snap_points_changedare_horizontal_snap_points_regularset_are_horizontal_snap_points_regularare_vertical_snap_points_regularset_are_vertical_snap_points_regularget_irregular_snap_pointsget_regular_snap_points
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<StackPanel>
Returns a strong reference to this object.
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.
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.
spacing_property
fn spacing_property() -> &'static StyledProperty<f64>
Defines the Spacing property.
orientation_property
fn orientation_property() -> &'static StyledProperty<Orientation>
Defines the Orientation property.
are_horizontal_snap_points_regular_property
fn are_horizontal_snap_points_regular_property() -> &'static StyledProperty<bool>
Defines the AreHorizontalSnapPointsRegular property.
are_vertical_snap_points_regular_property
fn are_vertical_snap_points_regular_property() -> &'static StyledProperty<bool>
Defines the AreVerticalSnapPointsRegular property.
horizontal_snap_points_changed_event
fn horizontal_snap_points_changed_event() -> &'static RoutedEvent<RoutedEventArgs>
Defines the HorizontalSnapPointsChanged event.
vertical_snap_points_changed_event
fn vertical_snap_points_changed_event() -> &'static RoutedEvent<RoutedEventArgs>
Defines the VerticalSnapPointsChanged event.
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
new
fn new() -> Ref<Self>
spacing
fn spacing(self: &Self) -> f64
The size of the spacing to place between child controls.
set_spacing
fn set_spacing(self: &Self, value: f64)
orientation
fn orientation(self: &Self) -> Orientation
The orientation in which child controls will be layed out.
set_orientation
fn set_orientation(self: &Self, value: Orientation)
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.
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.
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.
set_are_horizontal_snap_points_regular
fn set_are_horizontal_snap_points_regular(self: &Self, value: bool)
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.
set_are_vertical_snap_points_regular
fn set_are_vertical_snap_points_regular(self: &Self, value: bool)
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.
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.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeControlImplExtPanelImplExtStackPanelImplExtBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyInputElementImplExtInteractiveImplExtLayoutableImplExtFerroObjectImplExtStyledElementImplExtClassDefaultsVisualImplExtErasedDestructorIntoEitherDerefUpcast<T>Upcast<StackPanel>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleStyledElementImplVisualImplInteractiveImplInputElementImplControlImplPanelImplFerroObjectImplLayoutableImplStackPanelImplINavigableContainerIScrollSnapPointsInfo
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.