pub trait RenderSliverHelpers: RenderSliver {
// Provided methods
fn hit_test_box_child(
self: RenderHandle<Self>,
app: &mut App,
result: &mut BoxHitTestResult<'_>,
child: AnyRenderBox,
main_axis_position: f64,
cross_axis_position: f64,
) -> bool { ... }
fn apply_paint_transform_for_box_child(
self: RenderHandle<Self>,
app: &App,
child: AnyRenderBox,
transform: &mut Matrix4,
) { ... }
}Expand description
Mixin for RenderSliver subclasses that provides some utility functions.
Provided Methods§
Sourcefn hit_test_box_child(
self: RenderHandle<Self>,
app: &mut App,
result: &mut BoxHitTestResult<'_>,
child: AnyRenderBox,
main_axis_position: f64,
cross_axis_position: f64,
) -> bool
fn hit_test_box_child( self: RenderHandle<Self>, app: &mut App, result: &mut BoxHitTestResult<'_>, child: AnyRenderBox, main_axis_position: f64, cross_axis_position: f64, ) -> bool
Utility function for RenderSliver::hit_test_children for use when the children are
crate::RenderBox widgets.
This function takes care of converting the position from the sliver coordinate system to the Cartesian coordinate system used by the box protocol.
This function relies on RenderSliver::child_main_axis_position to determine the
position of the child in question.
Calling this for a child that is not visible is not valid.
Sourcefn apply_paint_transform_for_box_child(
self: RenderHandle<Self>,
app: &App,
child: AnyRenderBox,
transform: &mut Matrix4,
)
fn apply_paint_transform_for_box_child( self: RenderHandle<Self>, app: &App, child: AnyRenderBox, transform: &mut Matrix4, )
Utility function for RenderObject::apply_paint_transform for use when the children
are crate::RenderBox widgets.
This function turns the value returned by RenderSliver::child_main_axis_position and
RenderSliver::child_cross_axis_position for the child in question into a translation
that it then applies to the given matrix.
Calling this for a child that is not visible is not valid.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".