ScrollViewerAutomationPeer
struct · ferroui-controls · v0.5.0
struct ScrollViewerAutomationPeer
An automation peer which represents a ScrollViewer.
Members
TYPEto_refconstructnewownerget_horizontal_scroll_bar_peerget_vertical_scroll_bar_peerhorizontally_scrollablehorizontal_scroll_percenthorizontal_view_sizevertically_scrollablevertical_scroll_percentvertical_view_sizescrollset_scroll_percent
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<ScrollViewerAutomationPeer>
Returns a strong reference to this object.
construct
fn construct(owner: &ScrollViewer) -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
new
fn new(owner: &ScrollViewer) -> Ref<Self>
Initializes a new peer of owner.
owner
fn owner(self: &Self) -> Ref<ScrollViewer>
Gets the owning scroll viewer.
get_horizontal_scroll_bar_peer
fn get_horizontal_scroll_bar_peer(self: &Self) -> Option<Ref<AutomationPeer>>
Gets the peer of the horizontal scroll bar of the scroll viewer, if it has one (not for use outside the framework).
get_vertical_scroll_bar_peer
fn get_vertical_scroll_bar_peer(self: &Self) -> Option<Ref<AutomationPeer>>
Gets the peer of the vertical scroll bar of the scroll viewer, if it has one (not for use outside the framework).
horizontally_scrollable
fn horizontally_scrollable(self: &Self) -> bool
Gets a value that indicates whether the control can scroll horizontally (the scroll provider contract).
horizontal_scroll_percent
fn horizontal_scroll_percent(self: &Self) -> f64
Gets the current horizontal scroll position (the scroll provider contract).
horizontal_view_size
fn horizontal_view_size(self: &Self) -> f64
Gets the current horizontal view size (the scroll provider contract).
vertically_scrollable
fn vertically_scrollable(self: &Self) -> bool
Gets a value that indicates whether the control can scroll vertically (the scroll provider contract).
vertical_scroll_percent
fn vertical_scroll_percent(self: &Self) -> f64
Gets the current vertical scroll position (the scroll provider contract).
vertical_view_size
fn vertical_view_size(self: &Self) -> f64
Gets the vertical view size (the scroll provider contract).
scroll
fn scroll(self: &Self, horizontal_amount: ScrollAmount, vertical_amount: ScrollAmount) -> Result<(), AutomationError>
Scrolls the visible region of the content area horizontally and vertically (the scroll provider contract).
Errors
AutomationError::ElementNotEnabled if the control is not
enabled, AutomationError::InvalidOperation if a direction that
cannot scroll is asked to scroll.
set_scroll_percent
fn set_scroll_percent(self: &Self, horizontal_percent: f64, vertical_percent: f64) -> Result<(), AutomationError>
Sets the horizontal and vertical scroll position as a percentage of the total content area within the control (the scroll provider contract).
Errors
AutomationError::ElementNotEnabled if the control is not
enabled, AutomationError::InvalidOperation if a direction that
cannot scroll is asked to scroll, AutomationError::ArgumentOutOfRange
if a percentage is out of range.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeAutomationPeerImplExtControlAutomationPeerImplExtBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyFerroObjectImplExtClassDefaultsErasedDestructorIntoEitherDerefUpcast<T>Upcast<ScrollViewerAutomationPeer>StaticTypeObjectTypeSubclassable<T>FerroObjectImplControlAutomationPeerImplAutomationPeerImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.