FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    MaterialRipple

    struct · ferroui-themes-material · v0.5.0

    struct MaterialRipple
    

    A bounded Material ink ripple. Place it inside the root of a control template, above the background/state layer and below the content. It observes the templated parent's input, so it neither intercepts hit testing nor changes the control's click, capture or focus behavior.

    Hover and focus state layers remain the template's responsibility. A separate pressed state layer must not be painted on top of this ripple: its default peak opacity is already 0.10.

    <material:MaterialRipple Fill="{TemplateBinding Foreground}"
                             CornerRadius="{TemplateBinding CornerRadius}"
                             ReducedMotion="{DynamicResource MaterialReducedMotion}" />
    

    Each touch contact has an independent wave; quick taps finish expanding before fading out. Frame callbacks and input subscriptions use weak references and are canceled on detachment.

    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<MaterialRipple>
    

    Returns a strong reference to this object.

    Source

    fill_property

    fn fill_property() -> &'static StyledProperty<Option<Rc<dyn IBrush>>>
    

    The ripple color, normally the surrounding component's content color.

    Source

    corner_radius_property

    fn corner_radius_property() -> &'static StyledProperty<CornerRadius>
    

    The clipping corners; bind to the animated surface corners for shape-changing buttons.

    Source

    is_bounded_property

    fn is_bounded_property() -> &'static StyledProperty<bool>
    

    Whether the ripple is clipped to the rounded layout bounds.

    Source

    radius_property

    fn radius_property() -> &'static StyledProperty<f64>
    

    An explicit final radius. NaN computes the radius from the control's bounds.

    Source

    interaction_opacity_property

    fn interaction_opacity_property() -> &'static StyledProperty<f64>
    

    The Material pressed-state opacity, multiplied by the brush's own alpha.

    Source

    reduced_motion_property

    fn reduced_motion_property() -> &'static StyledProperty<bool>
    

    Replaces radial motion by a steady pressed indication. Also honors platform settings.

    Source

    construct

    fn construct() -> Self
    

    Source

    new

    fn new() -> Ref<Self>
    

    Source

    fill

    fn fill(self: &Self) -> Option<Rc<dyn IBrush>>
    

    Source

    set_fill

    fn set_fill(self: &Self, value: Option<Rc<dyn IBrush>>)
    

    Source

    corner_radius

    fn corner_radius(self: &Self) -> CornerRadius
    

    Source

    set_corner_radius

    fn set_corner_radius(self: &Self, value: CornerRadius)
    

    Source

    is_bounded

    fn is_bounded(self: &Self) -> bool
    

    Source

    set_is_bounded

    fn set_is_bounded(self: &Self, value: bool)
    

    Source

    radius

    fn radius(self: &Self) -> f64
    

    Source

    set_radius

    fn set_radius(self: &Self, value: f64)
    

    Source

    interaction_opacity

    fn interaction_opacity(self: &Self) -> f64
    

    Source

    set_interaction_opacity

    fn set_interaction_opacity(self: &Self, value: f64)
    

    Source

    reduced_motion

    fn reduced_motion(self: &Self) -> bool
    

    Source

    set_reduced_motion

    fn set_reduced_motion(self: &Self, value: bool)
    

    Source

    begin_press

    fn begin_press(self: &Self, origin: Point)
    

    Starts a programmatic indication. The location is in this control's coordinate space. Template instances receive their input automatically and do not need this method.

    Source

    end_press

    fn end_press(self: &Self)
    

    Finishes the corresponding programmatic indication.

    Source

    active_ripple_count

    fn active_ripple_count(self: &Self) -> usize
    

    The number of held or fading press indications, useful to inspect control behavior.

    Source

    cancel

    fn cancel(self: &Self)
    

    Clears every indication, for example when a control becomes disabled.

    Source

    Trait implementations

    Availability

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