pub struct ScrollStateXY { /* private fields */ }Expand description
2D state
Implementations§
Source§impl ScrollStateXY
impl ScrollStateXY
pub fn new() -> Self
pub fn set_overscroll_enabled(&mut self, enabled: bool)
pub fn set_show_scrollbar(&self, show: bool)
pub fn overscroll_offset(&self) -> (f32, f32)
pub fn set_nested_scroll_parent(&self, conn: NestedScrollConnection)
pub fn set_viewport(&self, w: f32, h: f32)
pub fn set_content(&self, w: f32, h: f32)
pub fn set_offset_xy(&self, x: f32, y: f32)
pub fn get(&self) -> (f32, f32)
pub fn scroll_immediate(&self, d: Vec2) -> Vec2
pub fn tick(&self) -> bool
pub fn show_scrollbar(&self) -> bool
pub fn to_binding(&self) -> ScrollBinding
Trait Implementations§
Source§impl Clone for ScrollStateXY
impl Clone for ScrollStateXY
Source§fn clone(&self) -> ScrollStateXY
fn clone(&self) -> ScrollStateXY
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 moreAuto Trait Implementations§
impl !Freeze for ScrollStateXY
impl !RefUnwindSafe for ScrollStateXY
impl !Send for ScrollStateXY
impl !Sync for ScrollStateXY
impl !UnwindSafe for ScrollStateXY
impl Unpin for ScrollStateXY
impl UnsafeUnpin for ScrollStateXY
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