FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    VisualImpl

    trait · ferroui-base · v0.5.0

    trait VisualImpl: StyledElementImpl + $crate::Upcast<Visual>
    

    The overridable members introduced by the class.

    View source

    Members

    render

    fn render(this: &Self, context: &mut DrawingContext<'_>)
    

    Renders the visual to a drawing context.

    Source

    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.

    Source

    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.

    Source

    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.

    Source

    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.

    Source

    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.

    Source

    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.

    Source

    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.

    Source

    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.)

    Source

    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.)

    Source

    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.

    Source

    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.)

    Source

    detach_from_compositor

    fn detach_from_compositor(this: &Self)
    

    Releases the composition visual of the visual.

    Source

    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.

    Source

    synchronize_composition_properties

    fn synchronize_composition_properties(this: &Self)
    

    Copies the properties of the visual to its composition visual.

    Source

    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).

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.