IScrollable
trait · ferroui-base · v0.5.0
trait IScrollable
Interface implemented by scrollable controls.
Upstream this contract lives with the control primitives; it is defined
here because directional navigation is its only consumer in the base
library so far. An input element exposes it through the
as_scrollable virtual member of InputElement.
Members
extent
fn extent(self: &Self) -> Size
The extent of the scrollable content, in logical units.
offset
fn offset(self: &Self) -> Vector
The current scroll offset, in logical units.
set_offset
fn set_offset(self: &Self, value: Vector)
Sets the current scroll offset, in logical units.
viewport
fn viewport(self: &Self) -> Size
The size of the viewport, in logical units.
can_horizontally_scroll
fn can_horizontally_scroll(self: &Self) -> bool
Whether the content can be scrolled horizontally.
can_vertically_scroll
fn can_vertically_scroll(self: &Self) -> bool
Whether the content can be scrolled vertically.
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.