pub struct ScrollTarget {
pub rect: Rect,
pub callback: Arc<dyn Fn(f32, f32) + Send + Sync>,
}Expand description
A scrollable viewport region registered during painting.
ScrollView::paint registers one per live scroll region. The event router
dispatches InputEvent::Scroll to the target whose rect contains the cursor.
The callback receives (delta_x, delta_y) in logical pixels
(positive = content scrolls right / down).
Fields§
§rect: Rect§callback: Arc<dyn Fn(f32, f32) + Send + Sync>Auto Trait Implementations§
impl !RefUnwindSafe for ScrollTarget
impl !UnwindSafe for ScrollTarget
impl Freeze for ScrollTarget
impl Send for ScrollTarget
impl Sync for ScrollTarget
impl Unpin for ScrollTarget
impl UnsafeUnpin for ScrollTarget
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