pub trait IScrollable {
// Required methods
fn extent(&self) -> Size;
fn offset(&self) -> Vector;
fn set_offset(&self, value: Vector);
fn viewport(&self) -> Size;
fn can_horizontally_scroll(&self) -> bool;
fn can_vertically_scroll(&self) -> bool;
}Expand description
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.
Required Methods§
Sourcefn set_offset(&self, value: Vector)
fn set_offset(&self, value: Vector)
Sets the current scroll offset, in logical units.
Sourcefn can_horizontally_scroll(&self) -> bool
fn can_horizontally_scroll(&self) -> bool
Whether the content can be scrolled horizontally.
Sourcefn can_vertically_scroll(&self) -> bool
fn can_vertically_scroll(&self) -> bool
Whether the content can be scrolled vertically.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".