Skip to main content

Selectable

Trait Selectable 

Source
pub trait Selectable: SelectionHandler {
    // Required methods
    fn get_transform_to(
        self: Handle<Self>,
        app: &App,
        ancestor: Option<AnyRenderObject>,
    ) -> Matrix4;
    fn size(self: Handle<Self>, app: &mut App) -> Size;
    fn bounding_boxes(self: Handle<Self>, app: &mut App) -> Vec<Rect>;
    fn dispose_selectable(self: Handle<Self>, app: &mut App);

    // Provided method
    fn as_selectable(self: Handle<Self>) -> AnySelectable { ... }
}
Expand description

A mixin that can be selected by users under a SelectionArea.

Receives selection events; value must reflect the current selection, and listeners are notified when it changes. The object draws the selection highlight itself. It registers with a SelectionRegistrar through SelectionRegistrant.

Required Methods§

Source

fn get_transform_to( self: Handle<Self>, app: &App, ancestor: Option<AnyRenderObject>, ) -> Matrix4

{@macro flutter.rendering.RenderObject.getTransformTo}

Source

fn size(self: Handle<Self>, app: &mut App) -> Size

The size of this selectable.

Source

fn bounding_boxes(self: Handle<Self>, app: &mut App) -> Vec<Rect>

The bounding boxes of this selectable in its local coordinates.

Source

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

Disposes resources held by the mixin.

Provided Methods§

Source

fn as_selectable(self: Handle<Self>) -> AnySelectable

Erases this selectable for a registrar, as Dart’s implicit upcast.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§