FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    RevealBrush

    struct · ferroui-controls · v0.5.0

    struct RevealBrush
    

    The base of the Reveal brushes (WinUI Microsoft.UI.Xaml.Media.RevealBrush): a brush lit by the Reveal lights near the pointer.

    A RevealBackgroundBrush is lit by the hover and press lights the element whose state is set holds; a RevealBorderBrush by the border lights of the window. In fallback mode (always_use_fallback, or when the MaterialPolicy disables materials) the brush is its fallback_color.

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

    Returns a strong reference to this object.

    Source

    color_property

    fn color_property() -> &'static StyledProperty<Color>
    

    Color (default transparent white): the base colour the light is mixed with.

    Source

    target_theme_property

    fn target_theme_property() -> &'static StyledProperty<ApplicationTheme>
    

    TargetTheme (default light): the theme the brush is drawn for; the border light of the light theme darkens.

    Source

    always_use_fallback_property

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

    AlwaysUseFallback (default false).

    Source

    state_property

    fn state_property() -> &'static AttachedProperty<RevealBrushState>
    

    State (attached): the Reveal state of an element, which drives its hover and press lights.

    Source

    is_container_property

    fn is_container_property() -> &'static AttachedProperty<bool>
    

    IsContainer (attached, internal in WinUI): the element holds a hover and a press light.

    Source

    construct

    fn construct() -> Self
    

    Source

    color

    fn color(self: &Self) -> Color
    

    Source

    set_color

    fn set_color(self: &Self, value: Color)
    

    Source

    target_theme

    fn target_theme(self: &Self) -> ApplicationTheme
    

    Source

    set_target_theme

    fn set_target_theme(self: &Self, value: ApplicationTheme)
    

    Source

    always_use_fallback

    fn always_use_fallback(self: &Self) -> bool
    

    Source

    set_always_use_fallback

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

    Source

    get_state

    fn get_state(element: &Visual) -> RevealBrushState
    

    GetState.

    Source

    set_state

    fn set_state(element: &Visual, value: RevealBrushState)
    

    SetState.

    Source

    is_border

    fn is_border(self: &Self) -> bool
    

    Whether the brush is a border brush.

    Source

    is_in_fallback_mode

    fn is_in_fallback_mode(self: &Self) -> bool
    

    IsInFallbackMode: the policy disables materials or AlwaysUseFallback is set.

    Deviation (winui-materials.md): WinUI 3 always draws the fallback colour (its policy callback passes true); FerroUI draws Reveal unless the policy disables materials (energy saver, transparency effects off) or the platform asks for high contrast.

    Source

    Trait implementations

    Availability

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