# SetterViewModel

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-diagnostics/diagnostics/view_models/struct-setterviewmodel/

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

```rust
struct SetterViewModel
```

A setter of a value frame: the property, the value, and whether the setter is the one that
is in effect (`IsActive`) and whether the filter of the setters shows it (`IsVisible`).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/setter_view_model.rs#L20)

## Members

- [`new`](#function-new)
- [`construct`](#function-construct)
- [`property`](#function-property)
- [`name`](#function-name)
- [`value`](#function-value)
- [`is_active`](#function-is_active)
- [`set_is_active`](#function-set_is_active)
- [`is_visible`](#function-is_visible)
- [`set_is_visible`](#function-set_is_visible)
- [`copy_value`](#function-copy_value)
- [`copy_property_name`](#function-copy_property_name)
- [`copy_to_clipboard`](#function-copy_to_clipboard)

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

### new

```rust
fn new(property: &'static FerroProperty, value: Option<BoxedValue>, clipboard: Option<Rc<dyn IClipboard>>) -> Rc<Self>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/setter_view_model.rs#L43)

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

### construct

```rust
fn construct(property: &'static FerroProperty, value: Option<BoxedValue>, clipboard: Option<Rc<dyn IClipboard>>) -> Self
```

The state of the class, for the classes that derive from it (the constructor body runs
on it before it is shared).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/setter_view_model.rs#L53)

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

### property

```rust
fn property(self: &Self) -> &'static FerroProperty
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/setter_view_model.rs#L74)

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

### name

```rust
fn name(self: &Self) -> String
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/setter_view_model.rs#L78)

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

### value

```rust
fn value(self: &Self) -> Option<BoxedValue>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/setter_view_model.rs#L82)

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

### is_active

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/setter_view_model.rs#L86)

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

### set_is_active

```rust
fn set_is_active(self: &Self, value: bool)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/setter_view_model.rs#L90)

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

### is_visible

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/setter_view_model.rs#L94)

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

### set_is_visible

```rust
fn set_is_visible(self: &Self, value: bool)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/setter_view_model.rs#L98)

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

### copy_value

```rust
fn copy_value(self: &Self)
```

`CopyValue` of this class (the virtual member dispatches through `SetterViewModelRef`):
copies the text of the value.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/setter_view_model.rs#L104)

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

### copy_property_name

```rust
fn copy_property_name(self: &Self)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/setter_view_model.rs#L114)

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

### copy_to_clipboard

```rust
fn copy_to_clipboard(self: &Self, value: &str)
```

`CopyToClipboard`: starts setting the text of the clipboard, without waiting for it (the
managed original discards the task).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/setter_view_model.rs#L120)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- [`TreeModel`](/docs/0.5.0/api/ferroui-treedatagrid-core/accessor/trait-treemodel/)
- `PartialEq`
- [`INotifyPropertyChanged`](/docs/0.5.0/api/ferroui-base/data/model/use-inotifypropertychanged/)
- [`MarkupTyped`](/docs/0.5.0/api/ferroui-base/metadata/trait-markuptyped/)

## Availability

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