pub trait VisualImpl: StyledElementImpl + Upcast<Visual> {
Show 16 methods
// Provided methods
fn render(this: &Self, context: &mut DrawingContext<'_>) { ... }
fn on_attached_to_visual_tree_core(
this: &Self,
e: &VisualTreeAttachmentEventArgs,
) { ... }
fn on_detached_from_visual_tree_core(
this: &Self,
e: &VisualTreeAttachmentEventArgs,
) { ... }
fn on_attached_to_visual_tree(
this: &Self,
e: &VisualTreeAttachmentEventArgs,
) { ... }
fn on_detached_from_visual_tree(
this: &Self,
e: &VisualTreeAttachmentEventArgs,
) { ... }
fn on_visual_parent_changed(
this: &Self,
old_parent: Option<&Ref<Visual>>,
new_parent: Option<&Ref<Visual>>,
) { ... }
fn bypass_flow_direction_policies(this: &Self) -> bool { ... }
fn invalidate_mirror_transform(this: &Self) { ... }
fn clip_to_bounds_radius(this: &Self) -> Option<CornerRadius> { ... }
fn custom_hit_test(this: &Self, point: Point) -> Option<bool> { ... }
fn custom_hit_test_geometry(
this: &Self,
geometry: &Ref<Geometry>,
) -> Option<IntersectionResult> { ... }
fn ensure_initialized_for_visual_brush(this: &Self) { ... }
fn create_composition_visual(
this: &Self,
compositor: &Rc<Compositor>,
) -> CompositionDrawListVisual { ... }
fn detach_from_compositor(this: &Self) { ... }
fn synchronize_composition_child_visuals(this: &Self) { ... }
fn synchronize_composition_properties(this: &Self) { ... }
}Expand description
The overridable members introduced by the class.
Provided Methods§
Sourcefn render(this: &Self, context: &mut DrawingContext<'_>)
fn render(this: &Self, context: &mut DrawingContext<'_>)
Renders the visual to a drawing context.
Sourcefn on_attached_to_visual_tree_core(
this: &Self,
e: &VisualTreeAttachmentEventArgs,
)
fn on_attached_to_visual_tree_core( this: &Self, e: &VisualTreeAttachmentEventArgs, )
Calls the on_attached_to_visual_tree method for this control and
all of its visual descendants.
Sourcefn on_detached_from_visual_tree_core(
this: &Self,
e: &VisualTreeAttachmentEventArgs,
)
fn on_detached_from_visual_tree_core( this: &Self, e: &VisualTreeAttachmentEventArgs, )
Calls the on_detached_from_visual_tree method for this control
and all of its visual descendants.
Sourcefn on_attached_to_visual_tree(this: &Self, e: &VisualTreeAttachmentEventArgs)
fn on_attached_to_visual_tree(this: &Self, e: &VisualTreeAttachmentEventArgs)
Called when the control is added to a rooted visual tree.
Sourcefn on_detached_from_visual_tree(this: &Self, e: &VisualTreeAttachmentEventArgs)
fn on_detached_from_visual_tree(this: &Self, e: &VisualTreeAttachmentEventArgs)
Called when the control is removed from a rooted visual tree.
Sourcefn on_visual_parent_changed(
this: &Self,
old_parent: Option<&Ref<Visual>>,
new_parent: Option<&Ref<Visual>>,
)
fn on_visual_parent_changed( this: &Self, old_parent: Option<&Ref<Visual>>, new_parent: Option<&Ref<Visual>>, )
Called when the control’s visual parent changes.
Sourcefn bypass_flow_direction_policies(this: &Self) -> bool
fn bypass_flow_direction_policies(this: &Self) -> bool
Whether the control ignores the flow direction policies, i.e. is never mirrored.
Sourcefn invalidate_mirror_transform(this: &Self)
fn invalidate_mirror_transform(this: &Self)
Computes the has_mirror_transform value according to the flow
direction of this visual and its parent.
Sourcefn clip_to_bounds_radius(this: &Self) -> Option<CornerRadius>
fn clip_to_bounds_radius(this: &Self) -> Option<CornerRadius>
The corner radius the visual clips its content with when
clip_to_bounds is set; None for a plain rectangular clip.
(Upstream: the IVisualWithRoundRectClip interface.)
Sourcefn custom_hit_test(this: &Self, point: Point) -> Option<bool>
fn custom_hit_test(this: &Self, point: Point) -> Option<bool>
The custom hit test of the visual at a point in its own
coordinates; None when the visual has none and is hit by what
it occupies or draws. (Upstream: the ICustomHitTest interface;
a class implementing it overrides this and the geometry form.)
Sourcefn custom_hit_test_geometry(
this: &Self,
geometry: &Ref<Geometry>,
) -> Option<IntersectionResult>
fn custom_hit_test_geometry( this: &Self, geometry: &Ref<Geometry>, ) -> Option<IntersectionResult>
The custom hit test of the visual against a geometry in its own
coordinates; None when the visual has none.
Sourcefn ensure_initialized_for_visual_brush(this: &Self)
fn ensure_initialized_for_visual_brush(this: &Self)
Ensures that the visual is ready to use as the visual in a
visual brush. (Upstream: the IVisualBrushInitialize interface;
a class implementing it overrides this.)
Sourcefn create_composition_visual(
this: &Self,
compositor: &Rc<Compositor>,
) -> CompositionDrawListVisual
fn create_composition_visual( this: &Self, compositor: &Rc<Compositor>, ) -> CompositionDrawListVisual
Creates the composition visual of the visual on compositor.
Sourcefn detach_from_compositor(this: &Self)
fn detach_from_compositor(this: &Self)
Releases the composition visual of the visual.
Sourcefn synchronize_composition_child_visuals(this: &Self)
fn synchronize_composition_child_visuals(this: &Self)
Makes the children of the composition visual match the visual children (in Z order) and the child composition visual.
Sourcefn synchronize_composition_properties(this: &Self)
fn synchronize_composition_properties(this: &Self)
Copies the properties of the visual to its composition visual.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".