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.
Members
TYPEto_refcolor_propertytarget_theme_propertyalways_use_fallback_propertystate_propertyis_container_propertyconstructcolorset_colortarget_themeset_target_themealways_use_fallbackset_always_use_fallbackget_stateset_stateis_borderis_in_fallback_mode
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<RevealBrush>
Returns a strong reference to this object.
color_property
fn color_property() -> &'static StyledProperty<Color>
Color (default transparent white): the base colour the light is
mixed with.
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.
always_use_fallback_property
fn always_use_fallback_property() -> &'static StyledProperty<bool>
AlwaysUseFallback (default false).
state_property
fn state_property() -> &'static AttachedProperty<RevealBrushState>
State (attached): the Reveal state of an element, which drives
its hover and press lights.
is_container_property
fn is_container_property() -> &'static AttachedProperty<bool>
IsContainer (attached, internal in WinUI): the element holds a
hover and a press light.
construct
fn construct() -> Self
color
fn color(self: &Self) -> Color
set_color
fn set_color(self: &Self, value: Color)
target_theme
fn target_theme(self: &Self) -> ApplicationTheme
set_target_theme
fn set_target_theme(self: &Self, value: ApplicationTheme)
always_use_fallback
fn always_use_fallback(self: &Self) -> bool
set_always_use_fallback
fn set_always_use_fallback(self: &Self, value: bool)
get_state
fn get_state(element: &Visual) -> RevealBrushState
GetState.
set_state
fn set_state(element: &Visual, value: RevealBrushState)
SetState.
is_border
fn is_border(self: &Self) -> bool
Whether the brush is a border brush.
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.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyBrushImplExtXamlCompositionBrushBaseImplExtFerroObjectImplExtClassDefaultsErasedDestructorIntoEitherDerefUpcast<T>Upcast<RevealBrush>StaticTypeObjectTypeSubclassable<T>BrushImplFerroObjectImplXamlCompositionBrushBaseImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.