pub struct SceneConstraints { /* private fields */ }Expand description
Reactive interaction-policy bundle owned by Scene. Apps
configure pan/zoom behaviour by writing to these signals; gesture
closures in SceneView read them live, so
runtime mode switches (e.g. a toolbar toggling pan locks) take
effect on the next event without rebuilding the view.
All four signals are exposed individually via Scene accessors
(pan_axes_signal, pan_bounds_signal, zoom_range_signal,
zoomable_signal). Per-(sub-)scene independence falls out of the
model: each nested SceneView carries its own Scene with its
own SceneConstraints.
View-level tightening overrides (pan_bounds_override,
zoom_range_override) layer on top per-SceneView — the
effective constraint is the intersection. Two views over the
same Scene can lock down independently; neither can loosen
what the Scene declares.
Implementations§
Source§impl SceneConstraints
impl SceneConstraints
Sourcepub fn pan_axes_signal(&self) -> Signal<PanAxes>
pub fn pan_axes_signal(&self) -> Signal<PanAxes>
Reactive pan-axes signal. Gesture handlers read live.
Sourcepub fn pan_bounds_signal(&self) -> Signal<Option<Rect>>
pub fn pan_bounds_signal(&self) -> Signal<Option<Rect>>
Reactive pan-bounds signal. None = unconstrained.
Sourcepub fn zoom_range_signal(&self) -> Signal<Option<RangeInclusive<f32>>>
pub fn zoom_range_signal(&self) -> Signal<Option<RangeInclusive<f32>>>
Reactive zoom-range signal. None = unconstrained from
the Scene side.
Sourcepub fn zoomable_signal(&self) -> Signal<bool>
pub fn zoomable_signal(&self) -> Signal<bool>
Reactive zoomable-on/off signal. Equivalent to a zero-width zoom_range — kept as a separate boolean for clarity and efficient short-circuit at gesture time.
Trait Implementations§
Source§impl Debug for SceneConstraints
impl Debug for SceneConstraints
Auto Trait Implementations§
impl !RefUnwindSafe for SceneConstraints
impl !Send for SceneConstraints
impl !Sync for SceneConstraints
impl !UnwindSafe for SceneConstraints
impl Freeze for SceneConstraints
impl Unpin for SceneConstraints
impl UnsafeUnpin for SceneConstraints
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.impl<T> ErasedDestructor for Twhere
T: 'static,
§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