Struct zng_wgt_scroll::cmd::ScrollRequest
source · pub struct ScrollRequest {
pub alternate: bool,
pub clamp: (f32, f32),
}
Expand description
Parameters for the scroll and page commands.
Fields§
§alternate: bool
If the alt factor should be applied to the base scroll unit when scrolling.
clamp: (f32, f32)
Only scroll within this inclusive range. The range is normalized 0.0..=1.0
, the default is (f32::MIN, f32::MAX)
.
Note that the commands are enabled and disabled for the full range, this parameter controls the range for the request only.
Implementations§
source§impl ScrollRequest
impl ScrollRequest
sourcepub fn to_param(self) -> CommandParam
pub fn to_param(self) -> CommandParam
Pack the request into a command parameter.
sourcepub fn from_param(p: &CommandParam) -> Option<Self>
pub fn from_param(p: &CommandParam) -> Option<Self>
Extract a clone of the request from the command parameter if it is of a compatible type.
sourcepub fn from_args(args: &CommandArgs) -> Option<Self>
pub fn from_args(args: &CommandArgs) -> Option<Self>
Extract a clone of the request from CommandArgs::param
if it is set to a compatible type and
stop-propagation was not requested for the event.
Trait Implementations§
source§impl Clone for ScrollRequest
impl Clone for ScrollRequest
source§fn clone(&self) -> ScrollRequest
fn clone(&self) -> ScrollRequest
Returns a copy 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 Debug for ScrollRequest
impl Debug for ScrollRequest
source§impl Default for ScrollRequest
impl Default for ScrollRequest
source§impl From<bool> for ScrollRequest
impl From<bool> for ScrollRequest
source§impl IntoVar<ScrollRequest> for bool
impl IntoVar<ScrollRequest> for bool
source§impl PartialEq for ScrollRequest
impl PartialEq for ScrollRequest
impl IntoValue<ScrollRequest> for bool
impl StructuralPartialEq for ScrollRequest
Auto Trait Implementations§
impl Freeze for ScrollRequest
impl RefUnwindSafe for ScrollRequest
impl Send for ScrollRequest
impl Sync for ScrollRequest
impl Unpin for ScrollRequest
impl UnwindSafe for ScrollRequest
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
source§impl<T> AnyVarValue for Twhere
T: VarValue,
impl<T> AnyVarValue for Twhere
T: VarValue,
source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Access to mut
dyn Any
methods.source§fn clone_boxed(&self) -> Box<dyn AnyVarValue>
fn clone_boxed(&self) -> Box<dyn AnyVarValue>
Clone the value.
source§fn clone_boxed_var(&self) -> Box<dyn AnyVar>
fn clone_boxed_var(&self) -> Box<dyn AnyVar>
Clone the value into a new boxed
LocalVar<Self>
.source§fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
Gets if
self
equals other
.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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> FsChangeNote for T
impl<T> FsChangeNote for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more