VisualImpl
trait · ferroui-base · v0.5.0
trait VisualImpl: StyledElementImpl + $crate::Upcast<Visual>
The overridable members introduced by the class.
Members
renderon_attached_to_visual_tree_coreon_detached_from_visual_tree_coreon_attached_to_visual_treeon_detached_from_visual_treeon_visual_parent_changedbypass_flow_direction_policiesinvalidate_mirror_transformclip_to_bounds_radiuscustom_hit_testcustom_hit_test_geometryensure_initialized_for_visual_brushdetach_from_compositorsynchronize_composition_child_visualssynchronize_composition_propertiesrequires_composition_visual
render
fn render(this: &Self, context: &mut DrawingContext<'_>)
Renders the visual to a drawing context.
on_attached_to_visual_tree_core
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.
on_detached_from_visual_tree_core
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.
on_attached_to_visual_tree
fn on_attached_to_visual_tree(this: &Self, e: &VisualTreeAttachmentEventArgs)
Called when the control is added to a rooted visual tree.
on_detached_from_visual_tree
fn on_detached_from_visual_tree(this: &Self, e: &VisualTreeAttachmentEventArgs)
Called when the control is removed from a rooted visual tree.
on_visual_parent_changed
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.
bypass_flow_direction_policies
fn bypass_flow_direction_policies(this: &Self) -> bool
Whether the control ignores the flow direction policies, i.e. is never mirrored.
invalidate_mirror_transform
fn invalidate_mirror_transform(this: &Self)
Computes the has_mirror_transform value according to the flow
direction of this visual and its parent.
clip_to_bounds_radius
fn clip_to_bounds_radius(this: &Self) -> Option<crate::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.)
custom_hit_test
fn custom_hit_test(this: &Self, point: crate::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.)
custom_hit_test_geometry
fn custom_hit_test_geometry(this: &Self, geometry: &Ref<crate::media::Geometry>) -> Option<crate::media::IntersectionResult>
The custom hit test of the visual against a geometry in its own
coordinates; None when the visual has none.
ensure_initialized_for_visual_brush
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.)
detach_from_compositor
fn detach_from_compositor(this: &Self)
Releases the composition visual of the visual.
synchronize_composition_child_visuals
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.
synchronize_composition_properties
fn synchronize_composition_properties(this: &Self)
Copies the properties of the visual to its composition visual.
requires_composition_visual
fn requires_composition_visual(this: &Self) -> bool
Whether the visual has a composition visual of its own whatever it draws: a class
whose create_composition_visual makes a
composition visual that shows something itself says so here. Any other visual gets
its composition visual once it sets something the compositor applies, or is asked
for it (docs/porting/desktop-performance.md, section 9.41); until then what it draws
is an item of the composition visual of the nearest visual above it that has one
(section 9.42).
Trait implementations
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.