Skip to main content

SelectionContainerDelegate

Trait SelectionContainerDelegate 

Source
pub trait SelectionContainerDelegate: SelectionHandler + SelectionRegistrar {
    // Required methods
    fn selection_container_delegate_data(
        self: Handle<Self>,
        app: &App,
    ) -> &SelectionContainerDelegateData;
    fn selection_container_delegate_data_mut(
        self: Handle<Self>,
        app: &mut App,
    ) -> &mut SelectionContainerDelegateData;

    // Provided methods
    fn as_selection_container_delegate(
        self: Handle<Self>,
    ) -> AnySelectionContainerDelegate { ... }
    fn get_transform_from(
        self: Handle<Self>,
        app: &App,
        child: AnySelectable,
    ) -> Matrix4 { ... }
    fn get_transform_to(
        self: Handle<Self>,
        app: &App,
        ancestor: Option<AnyRenderObject>,
    ) -> Matrix4 { ... }
    fn has_size(self: Handle<Self>, app: &App) -> bool { ... }
    fn container_size(self: Handle<Self>, app: &App) -> Size { ... }
    fn selection_container_context(
        self: Handle<Self>,
        app: &App,
    ) -> BuildContext { ... }
}
Expand description

A delegate to handle selection events for a SelectionContainer.

The delegate also receives the selectables in the subtree through SelectionRegistrar.

Required Methods§

Source

fn selection_container_delegate_data( self: Handle<Self>, app: &App, ) -> &SelectionContainerDelegateData

The fields of this class.

Source

fn selection_container_delegate_data_mut( self: Handle<Self>, app: &mut App, ) -> &mut SelectionContainerDelegateData

The fields of this class, mutably.

Provided Methods§

Source

fn as_selection_container_delegate( self: Handle<Self>, ) -> AnySelectionContainerDelegate

Erases this delegate for a SelectionContainer, as Dart’s implicit upcast.

Source

fn get_transform_from( self: Handle<Self>, app: &App, child: AnySelectable, ) -> Matrix4

Gets the paint transform from the Selectable child to the SelectionContainer of this delegate; the container must have been laid out.

Source

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

Gets the paint transform from the SelectionContainer of this delegate to ancestor; the container must have been laid out.

Source

fn has_size(self: Handle<Self>, app: &App) -> bool

Whether the SelectionContainer has undergone layout and has a size.

Source

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

Gets the size of the SelectionContainer of this delegate; it must have been laid out.

Source

fn selection_container_context(self: Handle<Self>, app: &App) -> BuildContext

Dart’s _selectionContainerContext!: the context of the container this delegate serves.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§