pub struct TransformTrackingHelper { /* private fields */ }Expand description
Tracks the transform of a visual to the root of its visual tree: tells when it changes because the bounds of the visual or of one of its ancestors changed, or because the visual was attached or detached.
The helper does not keep the tracked visual alive; the visual keeps the helper alive for as long as it is tracked.
Implementations§
Source§impl TransformTrackingHelper
impl TransformTrackingHelper
Sourcepub fn new(defer_after_render_pass: bool) -> Rc<TransformTrackingHelper>
pub fn new(defer_after_render_pass: bool) -> Rc<TransformTrackingHelper>
Creates the helper. With defer_after_render_pass a change of
bounds is processed after the next render pass, otherwise right
before it.
Sourcepub fn set_visual(&self, visual: Option<&Ref<Visual>>)
pub fn set_visual(&self, visual: Option<&Ref<Visual>>)
Sets the visual to track, or stops tracking.
Sourcepub fn matrix(&self) -> Option<Matrix>
pub fn matrix(&self) -> Option<Matrix>
The transform of the tracked visual to its visual root, if it is attached to one.
Sourcepub fn matrix_changed(
&self,
handler: impl Fn() + 'static,
) -> Rc<dyn IDisposable>
pub fn matrix_changed( &self, handler: impl Fn() + 'static, ) -> Rc<dyn IDisposable>
Raised when matrix has changed. Disposing the
returned handle unsubscribes.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for TransformTrackingHelper
impl !RefUnwindSafe for TransformTrackingHelper
impl !Send for TransformTrackingHelper
impl !Sync for TransformTrackingHelper
impl !UnwindSafe for TransformTrackingHelper
impl Unpin for TransformTrackingHelper
impl UnsafeUnpin for TransformTrackingHelper
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more