Skip to main content

SelectionRegistrant

Trait SelectionRegistrant 

Source
pub trait SelectionRegistrant: Selectable {
    // Required methods
    fn selection_registrant_data(
        self: Handle<Self>,
        app: &App,
    ) -> &SelectionRegistrantData;
    fn selection_registrant_data_mut(
        self: Handle<Self>,
        app: &mut App,
    ) -> &mut SelectionRegistrantData;

    // Provided methods
    fn registrar(self: Handle<Self>, app: &App) -> Option<AnySelectionRegistrar> { ... }
    fn set_registrar(
        self: Handle<Self>,
        app: &mut App,
        value: Option<SelectionRegistrarRef>,
    ) { ... }
    fn update_selection_registrar_subscription(
        self: Handle<Self>,
        app: &mut App,
    ) { ... }
    fn remove_selection_registrar_subscription(
        self: Handle<Self>,
        app: &mut App,
    ) { ... }
    fn dispose_selection_registrant(self: Handle<Self>, app: &mut App) { ... }
}
Expand description

A mixin that auto-registers the mixer with its registrar.

Set registrar to the registrar to register to. The mixin only registers while the SelectionGeometry::has_content returned by the selectable is true.

Required Methods§

Source

fn selection_registrant_data( self: Handle<Self>, app: &App, ) -> &SelectionRegistrantData

The fields of this mixin.

Source

fn selection_registrant_data_mut( self: Handle<Self>, app: &mut App, ) -> &mut SelectionRegistrantData

The fields of this mixin, mutably.

Provided Methods§

Source

fn registrar(self: Handle<Self>, app: &App) -> Option<AnySelectionRegistrar>

The registrar this mixin will be or is registered to.

Source

fn set_registrar( self: Handle<Self>, app: &mut App, value: Option<SelectionRegistrarRef>, )

Dart SelectionRegistrant.registrar =.

Source

fn update_selection_registrar_subscription(self: Handle<Self>, app: &mut App)

Dart’s _updateSelectionRegistrarSubscription.

Source

fn remove_selection_registrar_subscription(self: Handle<Self>, app: &mut App)

Dart’s _removeSelectionRegistrarSubscription.

Source

fn dispose_selection_registrant(self: Handle<Self>, app: &mut App)

Dart SelectionRegistrant.dispose’s own part; the mixer then runs the rest of its dispose, as Dart’s super.dispose().

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§