pub struct DefaultContainerInputHandler;Expand description
Default implementation of ContainerInputHandler
Trait Implementations§
Source§impl Clone for DefaultContainerInputHandler
impl Clone for DefaultContainerInputHandler
Source§fn clone(&self) -> DefaultContainerInputHandler
fn clone(&self) -> DefaultContainerInputHandler
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ContainerInputHandler for DefaultContainerInputHandler
impl ContainerInputHandler for DefaultContainerInputHandler
Source§fn hit_test_scrollbar(
&self,
scrollbar_rect: &Rect,
mouse_pos: (f64, f64),
) -> bool
fn hit_test_scrollbar( &self, scrollbar_rect: &Rect, mouse_pos: (f64, f64), ) -> bool
Test if mouse position is inside scrollbar rect
Source§fn mouse_to_scroll_offset(
&self,
mouse_y: f64,
scrollbar_y: f64,
scrollbar_height: f64,
content_height: f64,
viewport_height: f64,
) -> f64
fn mouse_to_scroll_offset( &self, mouse_y: f64, scrollbar_y: f64, scrollbar_height: f64, content_height: f64, viewport_height: f64, ) -> f64
Convert mouse Y position to scroll offset (for drag scrolling)
Source§fn scroll_to_delta(&self, scroll_delta: f64, _viewport_height: f64) -> f64
fn scroll_to_delta(&self, scroll_delta: f64, _viewport_height: f64) -> f64
Convert scroll wheel delta to scroll offset change
Source§fn clamp_scroll_offset(
&self,
offset: f64,
content_height: f64,
viewport_height: f64,
) -> f64
fn clamp_scroll_offset( &self, offset: f64, content_height: f64, viewport_height: f64, ) -> f64
Clamp scroll offset to valid range [0, max_scroll]
Source§impl Debug for DefaultContainerInputHandler
impl Debug for DefaultContainerInputHandler
Source§impl Default for DefaultContainerInputHandler
impl Default for DefaultContainerInputHandler
Source§fn default() -> DefaultContainerInputHandler
fn default() -> DefaultContainerInputHandler
Returns the “default value” for a type. Read more
impl Copy for DefaultContainerInputHandler
Auto Trait Implementations§
impl Freeze for DefaultContainerInputHandler
impl RefUnwindSafe for DefaultContainerInputHandler
impl Send for DefaultContainerInputHandler
impl Sync for DefaultContainerInputHandler
impl Unpin for DefaultContainerInputHandler
impl UnsafeUnpin for DefaultContainerInputHandler
impl UnwindSafe for DefaultContainerInputHandler
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