pub struct ScrollAxisBinding {
pub on_scroll: Option<Rc<dyn Fn(Vec2) -> Vec2>>,
pub on_scroll_with_source: Option<Rc<dyn Fn(Vec2, ScrollSource) -> Vec2>>,
pub set_viewport_main: Option<Rc<dyn Fn(f32)>>,
pub set_content_main: Option<Rc<dyn Fn(f32)>>,
pub get_offset_main: Option<Rc<dyn Fn() -> f32>>,
pub set_offset_main: Option<Rc<dyn Fn(f32)>>,
pub reversed: bool,
pub show_scrollbar: bool,
pub tick: Option<Rc<dyn Fn()>>,
pub set_nested_scroll_parent: Option<Rc<dyn Fn(NestedScrollConnection)>>,
}Expand description
Callbacks for a single-axis (vertical or horizontal) scroll container.
Fields§
§on_scroll: Option<Rc<dyn Fn(Vec2) -> Vec2>>§on_scroll_with_source: Option<Rc<dyn Fn(Vec2, ScrollSource) -> Vec2>>Source-aware scroll handler. Takes precedence over on_scroll in the
input pipeline; wheel deltas intentionally do not seed a fling.
set_viewport_main: Option<Rc<dyn Fn(f32)>>Set viewport size along the scroll axis (height for V, width for H).
set_content_main: Option<Rc<dyn Fn(f32)>>Set content size along the scroll axis.
get_offset_main: Option<Rc<dyn Fn() -> f32>>§set_offset_main: Option<Rc<dyn Fn(f32)>>§reversed: boolReverse layout (Compose reverseLayout): offset 0 sits at the end of
the track and the thumb mapping runs backwards.
show_scrollbar: bool§tick: Option<Rc<dyn Fn()>>§set_nested_scroll_parent: Option<Rc<dyn Fn(NestedScrollConnection)>>Trait Implementations§
Source§impl Clone for ScrollAxisBinding
impl Clone for ScrollAxisBinding
Source§impl Debug for ScrollAxisBinding
impl Debug for ScrollAxisBinding
Auto Trait Implementations§
impl !RefUnwindSafe for ScrollAxisBinding
impl !Send for ScrollAxisBinding
impl !Sync for ScrollAxisBinding
impl !UnwindSafe for ScrollAxisBinding
impl Forget for ScrollAxisBinding
impl Freeze for ScrollAxisBinding
impl Move for ScrollAxisBinding
impl Unpin for ScrollAxisBinding
impl UnsafeUnpin for ScrollAxisBinding
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