# RevealHoverLight

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/media/struct-revealhoverlight/

**struct** · [`ferroui-controls`](/docs/0.5.0/api/ferroui-controls/) · v0.5.0

```rust
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](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/media/reveal_lights.rs#L272)

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`new_press_light`](#function-new_press_light)
- [`is_press_light`](#function-is_press_light)
- [`spot_light`](#function-spot_light)
- [`is_on`](#function-is_on)
- [`go_to_state`](#function-go_to_state)

<a id="assoc_const-type"></a>

### TYPE

```rust
const TYPE: &'static $crate::TypeInfo
```

The runtime type of this class.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/media/reveal_lights.rs#L277)

<a id="function-to_ref"></a>

### to_ref

```rust
fn to_ref(self: &Self) -> $crate::Ref<RevealHoverLight>
```

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/media/reveal_lights.rs#L277)

<a id="function-construct"></a>

### construct

```rust
fn construct() -> Self
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/media/reveal_lights.rs#L331)

<a id="function-new"></a>

### new

```rust
fn new() -> Ref<Self>
```

A hover light.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/media/reveal_lights.rs#L336)

<a id="function-new_press_light"></a>

### new_press_light

```rust
fn new_press_light() -> Ref<Self>
```

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

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/media/reveal_lights.rs#L341)

<a id="function-is_press_light"></a>

### is_press_light

```rust
fn is_press_light(self: &Self) -> bool
```

Whether the light is a press light.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/media/reveal_lights.rs#L348)

<a id="function-spot_light"></a>

### spot_light

```rust
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](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/media/reveal_lights.rs#L354)

<a id="function-is_on"></a>

### is_on

```rust
fn is_on(self: &Self) -> bool
```

Whether the light is switched on.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/media/reveal_lights.rs#L359)

<a id="function-go_to_state"></a>

### go_to_state

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

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

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/media/reveal_lights.rs#L538)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- [`XamlLightImplExt`](/docs/0.5.0/api/ferroui-base/media/trait-xamllightimplext/)
- [`FerroObjectImplExt`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimplext/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<RevealHoverLight>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`StaticType`](/docs/0.5.0/api/ferroui-base/trait-statictype/)
- [`ObjectType`](/docs/0.5.0/api/ferroui-base/trait-objecttype/)
- [`Subclassable<T>`](/docs/0.5.0/api/ferroui-base/trait-subclassable/)
- [`DefaultConstructible`](/docs/0.5.0/api/ferroui-base/trait-defaultconstructible/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`XamlLightImpl`](/docs/0.5.0/api/ferroui-base/media/trait-xamllightimpl/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
