Skip to main content

RenderShiftedBox

Trait RenderShiftedBox 

Source
pub trait RenderShiftedBox: RenderObjectWithChildMixin<ChildType = AnyRenderBox> + RenderBox {
    // Provided methods
    fn compute_min_intrinsic_width(
        self: RenderHandle<Self>,
        app: &mut App,
        height: f64,
    ) -> f64 { ... }
    fn compute_max_intrinsic_width(
        self: RenderHandle<Self>,
        app: &mut App,
        height: f64,
    ) -> f64 { ... }
    fn compute_min_intrinsic_height(
        self: RenderHandle<Self>,
        app: &mut App,
        width: f64,
    ) -> f64 { ... }
    fn compute_max_intrinsic_height(
        self: RenderHandle<Self>,
        app: &mut App,
        width: f64,
    ) -> f64 { ... }
    fn compute_distance_to_actual_baseline(
        self: RenderHandle<Self>,
        app: &mut App,
        baseline: TextBaseline,
    ) -> Option<f64> { ... }
    fn compute_dry_baseline(
        self: RenderHandle<Self>,
        app: &mut App,
        constraints: BoxConstraints,
        baseline: TextBaseline,
    ) -> Option<f64> { ... }
    fn hit_test_children(
        self: RenderHandle<Self>,
        app: &mut App,
        result: &mut BoxHitTestResult<'_>,
        position: Offset,
    ) -> bool { ... }
    fn paint(
        self: RenderHandle<Self>,
        app: &mut App,
        context: &mut PaintingContext,
        offset: Offset,
    ) { ... }
}
Expand description

Abstract class for one-child-layout render boxes that provide control over the child’s position.

Flutter’s RenderShiftedBox: the shared bodies. A leaf implements the marker and calls these where Dart would run the inherited method: RenderShiftedBox::paint(self, …).

Provided Methods§

Source

fn compute_min_intrinsic_width( self: RenderHandle<Self>, app: &mut App, height: f64, ) -> f64

The child’s minimum intrinsic width, or 0 without a child.

Source

fn compute_max_intrinsic_width( self: RenderHandle<Self>, app: &mut App, height: f64, ) -> f64

The child’s maximum intrinsic width, or 0 without a child.

Source

fn compute_min_intrinsic_height( self: RenderHandle<Self>, app: &mut App, width: f64, ) -> f64

The child’s minimum intrinsic height, or 0 without a child.

Source

fn compute_max_intrinsic_height( self: RenderHandle<Self>, app: &mut App, width: f64, ) -> f64

The child’s maximum intrinsic height, or 0 without a child.

Source

fn compute_distance_to_actual_baseline( self: RenderHandle<Self>, app: &mut App, baseline: TextBaseline, ) -> Option<f64>

The child’s baseline shifted by the child’s paint offset, or none without a child.

Source

fn compute_dry_baseline( self: RenderHandle<Self>, app: &mut App, constraints: BoxConstraints, baseline: TextBaseline, ) -> Option<f64>

The child’s dry baseline at this box’s constraints. The base applies no transform; subclasses override to add their offset.

Source

fn hit_test_children( self: RenderHandle<Self>, app: &mut App, result: &mut BoxHitTestResult<'_>, position: Offset, ) -> bool

Hit tests the child at its parent-data offset.

Source

fn paint( self: RenderHandle<Self>, app: &mut App, context: &mut PaintingContext, offset: Offset, )

Paints the child at its parent-data offset.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§