pub struct InputScrollBuilder<'a> { /* private fields */ }
Expand description
Builder returned by on_scroll
.
Implementations
sourceimpl<'a> InputScrollBuilder<'a>
impl<'a> InputScrollBuilder<'a>
sourcepub fn require_on_top(self, top: bool) -> Self
pub fn require_on_top(self, top: bool) -> Self
sourcepub fn require_focused(self, focus: bool) -> Self
pub fn require_focused(self, focus: bool) -> Self
Require the target to be focused.
Default: false
sourcepub fn enable_smooth(self, smooth: bool) -> Self
pub fn enable_smooth(self, smooth: bool) -> Self
Enable smoothing.
Convert steps into pixels and provide a smoothed output.
Default: false
sourcepub fn upper_blocks(self, upper_blocks: bool) -> Self
pub fn upper_blocks(self, upper_blocks: bool) -> Self
Don’t call this hook if a higher z-index is processed.
Useful for when scroll areas contain other scroll areas.
Default: false
Notes
- Weight is still respected, so this is only effective with hooks of the same weight.
- This has no effect on Window targets.
sourcepub fn call<F: FnMut(InputHookTarget, &WindowState, f32, f32) -> InputHookCtrl + Send + 'static>(
self,
method: F
) -> Self
pub fn call<F: FnMut(InputHookTarget, &WindowState, f32, f32) -> InputHookCtrl + Send + 'static>(
self,
method: F
) -> Self
sourcepub fn finish(self) -> Result<InputHookID, InputError>
pub fn finish(self) -> Result<InputHookID, InputError>
Finish building, validate, and submit it to Input
.
Possible Errors
NoMethod
: No method was added. Seecall
.NoTarget
: No call tobin()
orwindow()
was made.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for InputScrollBuilder<'a>
impl<'a> Send for InputScrollBuilder<'a>
impl<'a> !Sync for InputScrollBuilder<'a>
impl<'a> Unpin for InputScrollBuilder<'a>
impl<'a> !UnwindSafe for InputScrollBuilder<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more