FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    RevealHoverLight

    struct · ferroui-controls · v0.5.0

    struct RevealHoverLight
    

    The hover light of Reveal (WinUI's internal RevealHoverLight): a spot light 256 above the element under the pointer, whose cone covers the element (Clamp(Max(width, height) + 12, 16, 512)), switched on while the pointer is over the element. As a press light (RevealHoverLight::new_press_light) it is a narrower light (47.25) that flares when the element is pressed and fades out over 0.2 s (a quick press) or 1 to 1.5 s (a long one).

    RevealBrush::set_state adds a hover and a press light to an element and drives them.

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

    Returns a strong reference to this object.

    Source

    construct

    fn construct() -> Self
    

    Source

    new

    fn new() -> Ref<Self>
    

    A hover light.

    Source

    new_press_light

    fn new_press_light() -> Ref<Self>
    

    A press light (WinUI's SetIsPressLight(true)).

    Source

    is_press_light

    fn is_press_light(self: &Self) -> bool
    

    Whether the light is a press light.

    Source

    spot_light

    fn spot_light(self: &Self) -> Option<SpotLight>
    

    The spot light, while the light is connected and the policy allows it (the GetLight of the test API).

    Source

    is_on

    fn is_on(self: &Self) -> bool
    

    Whether the light is switched on.

    Source

    go_to_state

    fn go_to_state(self: &Self, state: RevealBrushState)
    

    GoToState: what the element's Reveal state asks of the light.

    Source

    Trait implementations

    Availability

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