# SelectionNodeBaseImpl

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

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

```rust
trait SelectionNodeBaseImpl<T: PropertyValue>
```

The overridable members of [`SelectionNodeBase`](/docs/0.5.0/api/ferroui-controls/selection/struct-selectionnodebase/).

The selection classes are plain shared structs, not part of the class
model, so their virtual members are modelled explicitly: the base keeps
the state and the base implementations (the inherent methods of the same
names on [`SelectionNodeBase`](/docs/0.5.0/api/ferroui-controls/selection/struct-selectionnodebase/)), and holds a weak reference to the
object deriving from it, through which every virtual call is made. See
the module documentation of `selection`.

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

## Members

- [`on_source_collection_change_started`](#function-on_source_collection_change_started)
- [`on_source_collection_changed`](#function-on_source_collection_changed)
- [`on_source_collection_change_finished`](#function-on_source_collection_change_finished)
- [`on_indexes_changed`](#function-on_indexes_changed)
- [`on_source_reset`](#function-on_source_reset)
- [`on_selection_removed`](#function-on_selection_removed)
- [`on_items_added`](#function-on_items_added)
- [`on_items_removed`](#function-on_items_removed)
- [`is_valid_collection_change`](#function-is_valid_collection_change)

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

### on_source_collection_change_started

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

Called when the source collection starts changing.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/selection/selection_node_base.rs#L19)

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

### on_source_collection_changed

```rust
fn on_source_collection_changed(self: &Self, e: &ItemsChangedEventArgs<'_>)
```

Called when the source collection changes.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/selection/selection_node_base.rs#L22)

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

### on_source_collection_change_finished

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

Called when the source collection has finished changing, and all
collection changed handlers have run.

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

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

### on_indexes_changed

```rust
fn on_indexes_changed(self: &Self, shift_index: i32, shift_delta: i32)
```

Called by the handling of a collection change, detailing the indexes
changed by the collection changing.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/selection/selection_node_base.rs#L30)

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

### on_source_reset

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

Called by the handling of a collection change, on collection reset.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/selection/selection_node_base.rs#L33)

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

### on_selection_removed

```rust
fn on_selection_removed(self: &Self, index: i32, count: i32, deselected_items: Vec<Option<T>>)
```

Called by the handling of a collection change, detailing the items
removed by a collection change.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/selection/selection_node_base.rs#L37)

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

### on_items_added

```rust
fn on_items_added(self: &Self, index: i32, items: ItemsView<'_>) -> CollectionChangeState<T>
```

Called by the handling of a collection change when items are added
to the source collection.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/selection/selection_node_base.rs#L41)

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

### on_items_removed

```rust
fn on_items_removed(self: &Self, index: i32, items: ItemsView<'_>) -> CollectionChangeState<T>
```

Called by the handling of a collection change when items are removed
from the source collection.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/selection/selection_node_base.rs#L45)

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

### is_valid_collection_change

```rust
fn is_valid_collection_change(self: &Self, e: &ItemsChangedEventArgs<'_>) -> bool
```

Whether a collection change can be applied to the selection.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/selection/selection_node_base.rs#L48)

## Trait implementations

- [`SelectionNodeBaseImpl<T>`](/docs/0.5.0/api/ferroui-controls/selection/trait-selectionnodebaseimpl/)

## Availability

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