pub struct InkFeature;Expand description
Dart’s abstract InkFeature: a visual reaction on a piece of Material.
To add an ink feature to a piece of Material, obtain the
MaterialInkController via Material::of and call
MaterialInkController::add_ink_feature.
Its bodies are associated fns taking the leaf’s Handle; a leaf’s override calls one
where Dart writes super. Its fields are InkFeatureData.
Implementations§
Source§impl InkFeature
impl InkFeature
Sourcepub fn controller<F: InkFeatureLeaf>(
this: Handle<F>,
app: &App,
) -> AnyMaterialInkController
pub fn controller<F: InkFeatureLeaf>( this: Handle<F>, app: &App, ) -> AnyMaterialInkController
The MaterialInkController associated with this InkFeature.
Typically used by subclasses to call
MaterialInkController::mark_needs_paint when they need to repaint.
Sourcepub fn reference_box<F: InkFeatureLeaf>(
this: Handle<F>,
app: &App,
) -> AnyRenderBox
pub fn reference_box<F: InkFeatureLeaf>( this: Handle<F>, app: &App, ) -> AnyRenderBox
The render box whose visual position defines the frame of reference for this ink feature.
Sourcepub fn on_removed<F: InkFeatureLeaf>(
this: Handle<F>,
app: &App,
) -> Option<Listener>
pub fn on_removed<F: InkFeatureLeaf>( this: Handle<F>, app: &App, ) -> Option<Listener>
Called when the ink feature is no longer visible on the material.
Sourcepub fn dispose<F: InkFeatureLeaf>(this: Handle<F>, app: &mut App)
pub fn dispose<F: InkFeatureLeaf>(this: Handle<F>, app: &mut App)
Dart’s InkFeature.dispose: frees up the resources associated with this ink feature.
The feature itself goes once the controller’s list and its owner let go of it.