pub struct ScrollBothBinding {
pub on_scroll: Option<Rc<dyn Fn(Vec2) -> Vec2>>,
pub set_viewport_width: Option<Rc<dyn Fn(f32)>>,
pub set_viewport_height: Option<Rc<dyn Fn(f32)>>,
pub set_content_width: Option<Rc<dyn Fn(f32)>>,
pub set_content_height: Option<Rc<dyn Fn(f32)>>,
pub get_offset_xy: Option<Rc<dyn Fn() -> (f32, f32)>>,
pub set_offset_xy: Option<Rc<dyn Fn(f32, 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 2D (both-axis) scroll container.
Fields§
§on_scroll: Option<Rc<dyn Fn(Vec2) -> Vec2>>§set_viewport_width: Option<Rc<dyn Fn(f32)>>§set_viewport_height: Option<Rc<dyn Fn(f32)>>§set_content_width: Option<Rc<dyn Fn(f32)>>§set_content_height: Option<Rc<dyn Fn(f32)>>§get_offset_xy: Option<Rc<dyn Fn() -> (f32, f32)>>§set_offset_xy: Option<Rc<dyn Fn(f32, f32)>>§show_scrollbar: bool§tick: Option<Rc<dyn Fn()>>§set_nested_scroll_parent: Option<Rc<dyn Fn(NestedScrollConnection)>>Trait Implementations§
Source§impl Clone for ScrollBothBinding
impl Clone for ScrollBothBinding
Source§fn clone(&self) -> ScrollBothBinding
fn clone(&self) -> ScrollBothBinding
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 ScrollBothBinding
impl Debug for ScrollBothBinding
Source§impl Default for ScrollBothBinding
impl Default for ScrollBothBinding
Source§fn default() -> ScrollBothBinding
fn default() -> ScrollBothBinding
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ScrollBothBinding
impl !Send for ScrollBothBinding
impl !Sync for ScrollBothBinding
impl !UnwindSafe for ScrollBothBinding
impl Freeze for ScrollBothBinding
impl Unpin for ScrollBothBinding
impl UnsafeUnpin for ScrollBothBinding
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