pub struct ScrollToRequest {
pub target: ScrollToTarget,
pub mode: ScrollToMode,
pub zoom: Option<Factor>,
}
Expand description
Parameters for the SCROLL_TO_CMD
.
Fields§
§target: ScrollToTarget
Area that will be scrolled into view.
mode: ScrollToMode
How much the scroll position will change to showcase the target widget.
zoom: Option<Factor>
Optional zoom scale target.
If set the offsets and scale will animate so that the mode
is fulfilled when this zoom factor is reached. If not set the scroll will happen in
the current zoom scale.
Note that the viewport size can change due to a scrollbar visibility changing, this size change is not accounted for when calculating minimal.
Implementations§
source§impl ScrollToRequest
impl ScrollToRequest
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 and the command was enabled when it was send.
Trait Implementations§
source§impl Clone for ScrollToRequest
impl Clone for ScrollToRequest
source§fn clone(&self) -> ScrollToRequest
fn clone(&self) -> ScrollToRequest
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ScrollToRequest
impl Debug for ScrollToRequest
source§impl PartialEq for ScrollToRequest
impl PartialEq for ScrollToRequest
impl StructuralPartialEq for ScrollToRequest
Auto Trait Implementations§
impl Freeze for ScrollToRequest
impl RefUnwindSafe for ScrollToRequest
impl Send for ScrollToRequest
impl Sync for ScrollToRequest
impl Unpin for ScrollToRequest
impl UnwindSafe for ScrollToRequest
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)
dyn Any
methods.source§fn clone_boxed(&self) -> Box<dyn AnyVarValue>
fn clone_boxed(&self) -> Box<dyn AnyVarValue>
source§fn clone_boxed_var(&self) -> Box<dyn AnyVar>
fn clone_boxed_var(&self) -> Box<dyn AnyVar>
LocalVar<Self>
.source§fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
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
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)
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>
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>
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