FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    InteractiveWaterRippleEffect

    struct · ferroui-base · v0.5.0

    struct InteractiveWaterRippleEffect
    

    The water ripple as an interactive effect class (Effector's WaterRippleShaderEffect): a press makes a strong ripple where it is and captures the pointer, a drag makes weaker ones along the way (at least about a tenth of the host apart), the release one more; the ripples age on the frames of the animation clock until they are gone (advance). Its value is a WaterRippleShaderEffect.

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this class.

    Source

    to_ref

    fn to_ref(self: &Self) -> $crate::Ref<InteractiveWaterRippleEffect>
    

    Returns a strong reference to this object.

    Source

    new

    fn new() -> Ref<Self>
    

    A new effect with the default value.

    Source

    with_value

    fn with_value(value: WaterRippleShaderEffect) -> Ref<Self>
    

    A new effect with value.

    Source

    value

    fn value(self: &Self) -> WaterRippleShaderEffect
    

    The current value of the effect: what its next snapshot is.

    Source

    set_value

    fn set_value(self: &Self, value: WaterRippleShaderEffect)
    

    Replaces the value of the effect; a different value invalidates the effect.

    Source

    update

    fn update(self: &Self, f: impl FnOnce(&mut WaterRippleShaderEffect) -> ())
    

    Changes the value of the effect with f; a change invalidates the effect, so its host takes a new snapshot. No borrow is held while the effect raises invalidated.

    Source

    advance

    fn advance(self: &Self, seconds: f64) -> bool
    

    Ages the ripples by seconds (what each frame of the animation clock does); whether the effect still moves (a ripple is there or the pointer is pressed).

    Source

    is_animating

    fn is_animating(self: &Self) -> bool
    

    Whether the frames of the animation clock run.

    Source

    Trait implementations

    Availability

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