# ISelectionProvider

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/automation/provider/trait-iselectionprovider/

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

```rust
trait ISelectionProvider
```

Exposes methods and properties to support access by a UI Automation client to controls
that act as containers for a collection of individual, selectable child items.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/i_selection_provider.rs#L6)

## Members

- [`peer`](#function-peer)
- [`can_select_multiple`](#function-can_select_multiple)
- [`is_selection_required`](#function-is_selection_required)
- [`get_selection`](#function-get_selection)

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

### peer

```rust
fn peer(self: &Self) -> Ref<AutomationPeer>
```

The automation peer that provides this contract.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/i_selection_provider.rs#L8)

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

### can_select_multiple

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

Gets a value that indicates whether the provider allows more than one child element
to be selected concurrently.

Windows: `ISelectionProvider.CanSelectMultiple`. macOS: no mapping.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/i_selection_provider.rs#L14)

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

### is_selection_required

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

Gets a value that indicates whether the provider requires at least one child element
to be selected.

Windows: `ISelectionProvider.IsSelectionRequired`. macOS: no mapping.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/i_selection_provider.rs#L20)

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

### get_selection

```rust
fn get_selection(self: &Self) -> Vec<Ref<AutomationPeer>>
```

Retrieves a provider for each child element that is selected.

Windows: `ISelectionProvider.GetSelection`.
macOS: `NSAccessibilityProtocol.accessibilitySelectedChildren`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/i_selection_provider.rs#L26)

## Trait implementations

- [`ISelectionProvider`](/docs/0.5.0/api/ferroui-controls/automation/provider/trait-iselectionprovider/)

## Availability

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