pub struct VisualTreeAttachmentEventArgs { /* private fields */ }Expand description
Holds the event arguments for the attached_to_visual_tree and
detached_from_visual_tree events.
Implementations§
Source§impl VisualTreeAttachmentEventArgs
impl VisualTreeAttachmentEventArgs
Sourcepub fn new(
attachment_point: Option<Ref<Visual>>,
presentation_source: Rc<dyn IPresentationSource>,
) -> Self
pub fn new( attachment_point: Option<Ref<Visual>>, presentation_source: Rc<dyn IPresentationSource>, ) -> Self
Panics if the presentation source has no root visual.
Sourcepub fn attachment_point(&self) -> Option<&Ref<Visual>>
pub fn attachment_point(&self) -> Option<&Ref<Visual>>
The parent that the visual’s tree is being attached to or detached
from. None when the presentation source’s root visual itself is
being attached or detached.
Sourcepub fn parent(&self) -> Option<&Ref<Visual>>
👎Deprecated: Use attachment_point
pub fn parent(&self) -> Option<&Ref<Visual>>
Use attachment_point
The parent that the visual’s tree is being attached to or detached from.
Sourcepub fn presentation_source(&self) -> &Rc<dyn IPresentationSource>
pub fn presentation_source(&self) -> &Rc<dyn IPresentationSource>
The presentation source that the visual is being attached to or detached from.
Sourcepub fn root(&self) -> &Ref<Visual>
👎Deprecated: This was previously always returning TopLevel. This is no longer guaranteed. Use TopLevel::get_top_level(visual) if you need a TopLevel or root_visual if you are interested in the root of the visual tree.
pub fn root(&self) -> &Ref<Visual>
This was previously always returning TopLevel. This is no longer guaranteed. Use TopLevel::get_top_level(visual) if you need a TopLevel or root_visual if you are interested in the root of the visual tree.
The root visual of the tree.
Sourcepub fn root_visual(&self) -> &Ref<Visual>
pub fn root_visual(&self) -> &Ref<Visual>
The root visual of the tree this visual is being attached to or detached from: the root visual of the presentation source.
pub fn set_root_visual(&mut self, value: Ref<Visual>)
Trait Implementations§
Source§impl PartialEq for VisualTreeAttachmentEventArgs
Copies compare equal when they describe the same attachment (the same
visuals and presentation source).
impl PartialEq for VisualTreeAttachmentEventArgs
Copies compare equal when they describe the same attachment (the same visuals and presentation source).
Auto Trait Implementations§
impl !RefUnwindSafe for VisualTreeAttachmentEventArgs
impl !Send for VisualTreeAttachmentEventArgs
impl !Sync for VisualTreeAttachmentEventArgs
impl !UnwindSafe for VisualTreeAttachmentEventArgs
impl Freeze for VisualTreeAttachmentEventArgs
impl Unpin for VisualTreeAttachmentEventArgs
impl UnsafeUnpin for VisualTreeAttachmentEventArgs
Blanket Implementations§
Source§impl<T> AnyValue for Twhere
T: PartialEq + 'static,
impl<T> AnyValue for Twhere
T: PartialEq + 'static,
fn any_value_as_any(&self) -> &(dyn Any + 'static)
fn any_value_eq(&self, other: &(dyn AnyValue + 'static)) -> bool
fn any_value_type_name(&self) -> &'static str
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> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
affects_render, metadata
overrides). Read more