IScrollSnapPointsInfo
trait · ferroui-controls · v0.5.0
trait IScrollSnapPointsInfo
Describes snap point behaviour for objects that contain and present items.
Members
are_horizontal_snap_points_regularset_are_horizontal_snap_points_regularare_vertical_snap_points_regularset_are_vertical_snap_points_regularget_irregular_snap_pointsget_regular_snap_pointshorizontal_snap_points_changedvertical_snap_points_changed
are_horizontal_snap_points_regular
fn are_horizontal_snap_points_regular(self: &Self) -> bool
Whether the horizontal snap points for the container 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 container 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.
Returns the collection of snap point distances for the provided orientation and alignment; an empty collection when no snap points are present.
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.
Returns the distance between the equidistant snap points (0 when no snap points are present) and the offset of the first snap point.
horizontal_snap_points_changed
fn horizontal_snap_points_changed(self: &Self, handler: SnapPointsChangedHandler) -> Rc<dyn IDisposable>
Occurs when the measurements for horizontal snap points change.
Disposing the returned handle removes the handler.
vertical_snap_points_changed
fn vertical_snap_points_changed(self: &Self, handler: SnapPointsChangedHandler) -> Rc<dyn IDisposable>
Occurs when the measurements for vertical snap points change.
Disposing the returned handle removes the handler.
Trait implementations
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.