FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ScrollContentPresenter

    struct · ferroui-controls · v0.5.0

    struct ScrollContentPresenter
    

    Presents a scrolling view of content inside a ScrollViewer.

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

    Returns a strong reference to this object.

    Source

    can_horizontally_scroll_property

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

    Defines the CanHorizontallyScroll property.

    Source

    can_vertically_scroll_property

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

    Defines the CanVerticallyScroll property.

    Source

    extent_property

    fn extent_property() -> &'static DirectProperty<ScrollContentPresenter, Size>
    

    Defines the Extent property.

    Source

    offset_property

    fn offset_property() -> &'static StyledProperty<Vector>
    

    Defines the Offset property.

    Source

    viewport_property

    fn viewport_property() -> &'static DirectProperty<ScrollContentPresenter, Size>
    

    Defines the Viewport property.

    Source

    horizontal_snap_points_type_property

    fn horizontal_snap_points_type_property() -> &'static AttachedProperty<SnapPointsType>
    

    Defines the HorizontalSnapPointsType property.

    Source

    vertical_snap_points_type_property

    fn vertical_snap_points_type_property() -> &'static AttachedProperty<SnapPointsType>
    

    Defines the VerticalSnapPointsType property.

    Source

    horizontal_snap_points_alignment_property

    fn horizontal_snap_points_alignment_property() -> &'static AttachedProperty<SnapPointsAlignment>
    

    Defines the HorizontalSnapPointsAlignment property.

    Source

    vertical_snap_points_alignment_property

    fn vertical_snap_points_alignment_property() -> &'static AttachedProperty<SnapPointsAlignment>
    

    Defines the VerticalSnapPointsAlignment property.

    Source

    is_scroll_chaining_enabled_property

    fn is_scroll_chaining_enabled_property() -> &'static AttachedProperty<bool>
    

    Defines the IsScrollChainingEnabled property.

    Source

    construct

    fn construct() -> Self
    

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

    Source

    new

    fn new() -> Ref<Self>
    

    Initializes a new instance of the class.

    Source

    can_horizontally_scroll

    fn can_horizontally_scroll(self: &Self) -> bool
    

    Gets a value indicating whether the content can be scrolled horizontally.

    Source

    set_can_horizontally_scroll

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

    Sets a value indicating whether the content can be scrolled horizontally.

    Source

    can_vertically_scroll

    fn can_vertically_scroll(self: &Self) -> bool
    

    Gets a value indicating whether the content can be scrolled vertically.

    Source

    set_can_vertically_scroll

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

    Sets a value indicating whether the content can be scrolled vertically.

    Source

    extent

    fn extent(self: &Self) -> Size
    

    Gets the extent of the scrollable content.

    Source

    offset

    fn offset(self: &Self) -> Vector
    

    Gets the current scroll offset.

    Source

    set_offset

    fn set_offset(self: &Self, value: Vector)
    

    Sets the current scroll offset.

    Source

    viewport

    fn viewport(self: &Self) -> Size
    

    Gets the size of the viewport on the scrollable content.

    Source

    horizontal_snap_points_type

    fn horizontal_snap_points_type(self: &Self) -> SnapPointsType
    

    Gets how scroll gesture reacts to the snap points along the horizontal axis.

    Source

    set_horizontal_snap_points_type

    fn set_horizontal_snap_points_type(self: &Self, value: SnapPointsType)
    

    Sets how scroll gesture reacts to the snap points along the horizontal axis.

    Source

    vertical_snap_points_type

    fn vertical_snap_points_type(self: &Self) -> SnapPointsType
    

    Gets how scroll gesture reacts to the snap points along the vertical axis.

    Source

    set_vertical_snap_points_type

    fn set_vertical_snap_points_type(self: &Self, value: SnapPointsType)
    

    Sets how scroll gesture reacts to the snap points along the vertical axis.

    Source

    horizontal_snap_points_alignment

    fn horizontal_snap_points_alignment(self: &Self) -> SnapPointsAlignment
    

    Gets how the existing snap points are horizontally aligned versus the initial viewport.

    Source

    set_horizontal_snap_points_alignment

    fn set_horizontal_snap_points_alignment(self: &Self, value: SnapPointsAlignment)
    

    Sets how the existing snap points are horizontally aligned versus the initial viewport.

    Source

    vertical_snap_points_alignment

    fn vertical_snap_points_alignment(self: &Self) -> SnapPointsAlignment
    

    Gets how the existing snap points are vertically aligned versus the initial viewport.

    Source

    set_vertical_snap_points_alignment

    fn set_vertical_snap_points_alignment(self: &Self, value: SnapPointsAlignment)
    

    Sets how the existing snap points are vertically aligned versus the initial viewport.

    Source

    is_scroll_chaining_enabled

    fn is_scroll_chaining_enabled(self: &Self) -> bool
    

    Gets if scroll chaining is enabled. The default value is true.

    After a user hits a scroll limit on an element that has been nested within another scrollable element, you can specify whether that parent element should continue the scrolling operation begun in its child element. This is called scroll chaining.

    Source

    set_is_scroll_chaining_enabled

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

    Sets if scroll chaining is enabled.

    Source

    bring_descendant_into_view

    fn bring_descendant_into_view(self: &Self, target: &Visual, target_rect: Rect) -> bool
    

    Attempts to bring a portion of the target visual into view by scrolling the content.

    target is the target visual and target_rect the portion of the target visual to bring into view. Returns true if the scroll offset was changed; otherwise false.

    Source

    bring_descendant_into_view_aligned

    fn bring_descendant_into_view_aligned(self: &Self, target: &Visual, target_rect: Rect, align_to_top: bool) -> bool
    

    Brings a descendant rectangle to the top or bottom of the viewport. This uses extent coordinates, so repeated requests remain correct before the next arrange pass applies a changed offset. Logical scrolling stays delegated to the content's own scrolling contract.

    Source

    zoom_factor

    fn zoom_factor(self: &Self) -> f64
    

    The zoom of the content: 1 unless the scroll viewer was zoomed (not upstream).

    Source

    set_zoom

    fn set_zoom(self: &Self, zoom: f64, offset: Vector)
    

    Zooms the content to zoom and scrolls to offset (in zoomed units), as the ChangeView of WinUI's scroll viewer does (not upstream). The content keeps its layout: the presenter scales it (Visual::manipulation_transform) and the extent is its zoomed size. A content that scrolls logically (a virtualizing panel) is not zoomed.

    Source

    Trait implementations

    Availability

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