FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    IEffectInputHandler

    trait · ferroui-base · v0.5.0

    trait IEffectInputHandler
    

    The pointer input of an interactive effect (Effector's ISkiaInputEffectHandler): implemented by an effect class constructed with Effect::construct_interactive.

    Every member has an empty default, as the members of Effector's SkiaInteractiveEffectBase have, so an effect implements what it uses.

    Routing

    The host routes its pointer events to the effect from handlers it adds to the direct and the bubble routes of each event (Interactive::DEFAULT_ROUTES), so that the effect sees what happens over the host and over its descendants:

    • after the handlers of the tunnel route, the class handlers of the host (its own on_pointer_* members) and the handlers the descendants of the host have on the bubble route, and before the ancestors of the host see the event on the bubble route; among the handlers of the host itself, in the order they were added;
    • an event that is already handled is not delivered, unless the effect asks for handled events (handled_events_too): the effect of a button, whose own handler handles the press, asks for them;
    • a pointer the host or the effect captured is routed to the host wherever it is, so the effect sees its moves and its release outside the bounds of the host; when the capture of the host or of one of its descendants is lost (the release of an implicit capture, or another element capturing the pointer), the effect receives on_pointer_capture_lost.

    The handlers of the effect may change the effect of the host: the effect then is detached (on_detached) and receives nothing more from it.

    View source

    Members

    handled_events_too

    fn handled_events_too(self: &Self) -> bool
    

    Whether the effect receives events that are already handled (default false).

    Source

    on_attached

    fn on_attached(self: &Self, _context: &EffectHostContext<'_>)
    

    The effect was attached to the host: it became the host's effect.

    Source

    on_detached

    fn on_detached(self: &Self, _context: &EffectHostContext<'_>)
    

    The effect was detached from the host: the host's effect was replaced or cleared.

    Source

    on_host_bounds_changed

    fn on_host_bounds_changed(self: &Self, _context: &EffectHostContext<'_>)
    

    The bounds, the render transform or the origin of the render transform of the host changed; also called once after on_attached.

    Source

    on_pointer_entered

    fn on_pointer_entered(self: &Self, _context: &EffectHostContext<'_>, _e: &PointerEventArgs)
    

    The pointer entered the host.

    Source

    on_pointer_exited

    fn on_pointer_exited(self: &Self, _context: &EffectHostContext<'_>, _e: &PointerEventArgs)
    

    The pointer left the host.

    Source

    on_pointer_moved

    fn on_pointer_moved(self: &Self, _context: &EffectHostContext<'_>, _e: &PointerEventArgs)
    

    The pointer moved over the host, or anywhere while the host captures it.

    Source

    on_pointer_pressed

    fn on_pointer_pressed(self: &Self, _context: &EffectHostContext<'_>, _e: &PointerPressedEventArgs)
    

    The pointer was pressed over the host.

    Source

    on_pointer_released

    fn on_pointer_released(self: &Self, _context: &EffectHostContext<'_>, _e: &PointerReleasedEventArgs)
    

    The pointer was released over the host, or anywhere while the host captures it.

    Source

    on_pointer_capture_lost

    fn on_pointer_capture_lost(self: &Self, _context: &EffectHostContext<'_>, _e: &PointerCaptureLostEventArgs)
    

    The host or one of its descendants lost the capture of the pointer.

    Source

    on_pointer_wheel_changed

    fn on_pointer_wheel_changed(self: &Self, _context: &EffectHostContext<'_>, _e: &PointerWheelEventArgs)
    

    The wheel was turned over the host.

    Source

    Trait implementations

    Availability

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