pub struct ScrollAxisBinding {
pub on_scroll: Option<Rc<dyn Fn(Vec2) -> 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 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>>§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)>>§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§fn clone(&self) -> ScrollAxisBinding
fn clone(&self) -> ScrollAxisBinding
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 moreSource§impl Debug for ScrollAxisBinding
impl Debug for ScrollAxisBinding
Source§impl Default for ScrollAxisBinding
impl Default for ScrollAxisBinding
Source§fn default() -> ScrollAxisBinding
fn default() -> ScrollAxisBinding
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ScrollAxisBinding
impl !Send for ScrollAxisBinding
impl !Sync for ScrollAxisBinding
impl !UnwindSafe for ScrollAxisBinding
impl Freeze 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