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§
Sourcefn get_transform_to(
self: Handle<Self>,
app: &App,
ancestor: Option<AnyRenderObject>,
) -> Matrix4
fn get_transform_to( self: Handle<Self>, app: &App, ancestor: Option<AnyRenderObject>, ) -> Matrix4
{@macro flutter.rendering.RenderObject.getTransformTo}
Sourcefn bounding_boxes(self: Handle<Self>, app: &mut App) -> Vec<Rect>
fn bounding_boxes(self: Handle<Self>, app: &mut App) -> Vec<Rect>
The bounding boxes of this selectable in its local coordinates.
Sourcefn dispose_selectable(self: Handle<Self>, app: &mut App)
fn dispose_selectable(self: Handle<Self>, app: &mut App)
Disposes resources held by the mixin.
Provided Methods§
Sourcefn as_selectable(self: Handle<Self>) -> AnySelectable
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".