# ISelectable

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/trait-iselectable/

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

```rust
trait ISelectable
```

Interface for objects that are selectable.

Controls such as the selecting items control check for this interface on
items that they display, to determine whether the item is selected.

A class implementing the trait is made known with
[`register_selectable`](/docs/0.5.0/api/ferroui-controls/function-register_selectable/), normally from its class initialization;
[`as_selectable`](/docs/0.5.0/api/ferroui-controls/function-as_selectable/) then views an object of the class (or of a class
derived from it) as the interface.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/i_selectable.rs#L13)

## Members

- [`is_selected`](#function-is_selected)
- [`set_is_selected`](#function-set_is_selected)

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

### is_selected

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

Gets whether the object is currently selected.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/i_selectable.rs#L15)

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

### set_is_selected

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

Sets whether the object is currently selected.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/i_selectable.rs#L18)

## Trait implementations

- [`ISelectable`](/docs/0.5.0/api/ferroui-controls/trait-iselectable/)

## Availability

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