Skip to main content

RenderCustomClip

Trait RenderCustomClip 

Source
pub trait RenderCustomClip<T: Clone + 'static>: RenderProxyBoxMixin {
Show 14 methods // Required methods fn custom_clip_data( self: RenderHandle<Self>, app: &App, ) -> &RenderCustomClipData<T>; fn custom_clip_data_mut( self: RenderHandle<Self>, app: &mut App, ) -> &mut RenderCustomClipData<T>; fn default_clip(self: RenderHandle<Self>, app: &App) -> T; // Provided methods fn clipper( self: RenderHandle<Self>, app: &App, ) -> Option<Rc<dyn CustomClipper<T>>> { ... } fn set_clipper( self: RenderHandle<Self>, app: &mut App, new_clipper: Option<Rc<dyn CustomClipper<T>>>, ) { ... } fn did_attach(self: RenderHandle<Self>, app: &mut App) { ... } fn did_detach(self: RenderHandle<Self>, app: &mut App) { ... } fn mark_needs_clip(self: RenderHandle<Self>, app: &mut App) { ... } fn clip_listener(self: RenderHandle<Self>) -> Listener { ... } fn clip_behavior(self: RenderHandle<Self>, app: &App) -> Clip { ... } fn set_clip_behavior(self: RenderHandle<Self>, app: &mut App, value: Clip) { ... } fn perform_layout(self: RenderHandle<Self>, app: &mut App) { ... } fn update_clip(self: RenderHandle<Self>, app: &mut App) { ... } fn clip(self: RenderHandle<Self>, app: &App) -> T { ... }
}
Expand description

A base class for render boxes that clip their child.

Flutter’s private _RenderCustomClip<T>: the shared bodies of a clip. A leaf implements default_clip, holds a RenderCustomClipData<T>, and calls these where Dart would run the inherited method: RenderCustomClip::perform_layout(self, app).

Required Methods§

Source

fn custom_clip_data( self: RenderHandle<Self>, app: &App, ) -> &RenderCustomClipData<T>

Mixin field access.

Source

fn custom_clip_data_mut( self: RenderHandle<Self>, app: &mut App, ) -> &mut RenderCustomClipData<T>

Source

fn default_clip(self: RenderHandle<Self>, app: &App) -> T

The clip to use when clipper is None.

Provided Methods§

Source

fn clipper( self: RenderHandle<Self>, app: &App, ) -> Option<Rc<dyn CustomClipper<T>>>

If non-None, determines which clip to use on the child.

Source

fn set_clipper( self: RenderHandle<Self>, app: &mut App, new_clipper: Option<Rc<dyn CustomClipper<T>>>, )

Sets clipper.

Source

fn did_attach(self: RenderHandle<Self>, app: &mut App)

Flutter’s attach after super.attach(owner).

Source

fn did_detach(self: RenderHandle<Self>, app: &mut App)

Flutter’s detach before super.detach().

Source

fn mark_needs_clip(self: RenderHandle<Self>, app: &mut App)

Flutter’s _markNeedsClip.

Source

fn clip_listener(self: RenderHandle<Self>) -> Listener

The _markNeedsClip tear-off, equal to itself across registrations.

Source

fn clip_behavior(self: RenderHandle<Self>, app: &App) -> Clip

Whether and how to clip the child.

Source

fn set_clip_behavior(self: RenderHandle<Self>, app: &mut App, value: Clip)

Source

fn perform_layout(self: RenderHandle<Self>, app: &mut App)

Flutter’s performLayout: a resize drops the cached clip.

Source

fn update_clip(self: RenderHandle<Self>, app: &mut App)

Flutter’s _updateClip: computes the clip if it is not cached.

Source

fn clip(self: RenderHandle<Self>, app: &App) -> T

The cached clip. Call update_clip first; Dart’s _clip!.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§