pub struct ScrollAxisRange {
pub value: f32,
pub max_value: f32,
pub reverse: bool,
pub content_padding_start: f32,
pub content_padding_end: f32,
}Expand description
This is Compose’s ScrollAxisRange (verticalScrollAxisRange,
horizontalScrollAxisRange). A lazy list has no whole extent to give, so
it reports the first visible item as the value and one more than that as
the end while it can still scroll; a reader only needs to know whether it
can page on.
content_padding_start and content_padding_end are the container’s
content padding at its top and bottom (or left and right) edges, in layout
pixels. Content scrolls under that padding, where a bar may cover it, so a
control a reader or the keyboard moves to is brought in past it.
Fields§
§value: f32§max_value: f32§reverse: bool§content_padding_start: f32§content_padding_end: f32Implementations§
Source§impl ScrollAxisRange
impl ScrollAxisRange
pub fn new(value: f32, max_value: f32, reverse: bool) -> ScrollAxisRange
Sourcepub fn with_content_padding(self, start: f32, end: f32) -> ScrollAxisRange
pub fn with_content_padding(self, start: f32, end: f32) -> ScrollAxisRange
The same range with the container’s content padding at its start and end edges, in layout pixels.
pub fn can_scroll_forward(&self) -> bool
pub fn can_scroll_backward(&self) -> bool
Trait Implementations§
Source§impl Clone for ScrollAxisRange
impl Clone for ScrollAxisRange
Source§fn clone(&self) -> ScrollAxisRange
fn clone(&self) -> ScrollAxisRange
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ScrollAxisRange
Source§impl Debug for ScrollAxisRange
impl Debug for ScrollAxisRange
Source§impl PartialEq for ScrollAxisRange
impl PartialEq for ScrollAxisRange
impl StructuralPartialEq for ScrollAxisRange
Auto Trait Implementations§
impl Freeze for ScrollAxisRange
impl RefUnwindSafe for ScrollAxisRange
impl Send for ScrollAxisRange
impl Sync for ScrollAxisRange
impl Unpin for ScrollAxisRange
impl UnsafeUnpin for ScrollAxisRange
impl UnwindSafe for ScrollAxisRange
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more