pub struct RenderView {
pub automatic_system_ui_adjustment: bool,
/* private fields */
}Expand description
The root of the render tree.
The view represents the total output surface of the render tree and handles
bootstrapping the rendering pipeline. The view has a unique child
crate::RenderBox, which is required to fill the entire output surface.
Not a box: its constraints come from its configuration, and its
child is the one slot Flutter’s RenderObjectWithChildMixin gives it.
Fields§
§automatic_system_ui_adjustment: boolWhether the system overlays are styled from the layer tree at every frame.
An application that would rather drive them itself, through
SystemChrome::set_system_ui_overlay_style, turns this off so its own style is
not overwritten by whatever happens to be annotated under the bars.
Implementations§
Source§impl RenderView
impl RenderView
Sourcepub fn new(
app: &mut App,
child: Option<AnyRenderBox>,
configuration: Option<ViewConfiguration>,
view: ViewRef,
) -> RenderHandle<RenderView>
pub fn new( app: &mut App, child: Option<AnyRenderBox>, configuration: Option<ViewConfiguration>, view: ViewRef, ) -> RenderHandle<RenderView>
Creates the root of the render tree.
Typically created by the binding (e.g., RendererBinding).
Providing a configuration is optional, but a configuration must be set
before calling prepare_initial_frame.
Sourcepub fn as_object(self: RenderHandle<Self>) -> AnyRenderObject
pub fn as_object(self: RenderHandle<Self>) -> AnyRenderObject
The type-erased RenderObject handle.
Sourcepub fn child(self: RenderHandle<Self>, app: &App) -> Option<AnyRenderBox>
pub fn child(self: RenderHandle<Self>, app: &App) -> Option<AnyRenderBox>
The render object’s unique child. Flutter’s RenderObjectWithChildMixin.child.
Sourcepub fn set_child(
self: RenderHandle<Self>,
app: &mut App,
value: Option<AnyRenderBox>,
)
pub fn set_child( self: RenderHandle<Self>, app: &mut App, value: Option<AnyRenderBox>, )
Sets the unique child, adopting or dropping as Flutter’s setter does.
Sourcepub fn size(self: RenderHandle<Self>, app: &App) -> Size
pub fn size(self: RenderHandle<Self>, app: &App) -> Size
The current layout size of the view.
Sourcepub fn configuration(self: RenderHandle<Self>, app: &App) -> ViewConfiguration
pub fn configuration(self: RenderHandle<Self>, app: &App) -> ViewConfiguration
The constraints used for the root layout.
Typically, this configuration is set by the RendererBinding, when the
RenderView is registered with it. It will also update the configuration
if necessary. Therefore, if used in conjunction with the RendererBinding
this property must not be set manually as the RendererBinding will just
override it.
§Panics
If no configuration has been set.
Sourcepub fn set_configuration(
self: RenderHandle<Self>,
app: &mut App,
value: ViewConfiguration,
)
pub fn set_configuration( self: RenderHandle<Self>, app: &mut App, value: ViewConfiguration, )
Sets configuration.
Sourcepub fn has_configuration(self: RenderHandle<Self>, app: &App) -> bool
pub fn has_configuration(self: RenderHandle<Self>, app: &App) -> bool
Whether a configuration has been set.
Sourcepub fn constraints(self: RenderHandle<Self>, app: &App) -> BoxConstraints
pub fn constraints(self: RenderHandle<Self>, app: &App) -> BoxConstraints
The constraints most recently supplied for layout: the configuration’s logical constraints.
§Panics
If no configuration has been set.
Sourcepub fn flutter_view(self: RenderHandle<Self>, app: &App) -> ViewRef
pub fn flutter_view(self: RenderHandle<Self>, app: &App) -> ViewRef
The host view into which this render tree is rendered.
Sourcepub fn prepare_initial_frame(self: RenderHandle<Self>, app: &mut App)
pub fn prepare_initial_frame(self: RenderHandle<Self>, app: &mut App)
Bootstrap the rendering pipeline by preparing the first frame.
This should only be called once, and must be called before changing
configuration. It is typically called immediately after calling
the constructor.
This does not actually schedule the first frame. Call
SchedulerBinding::ensure_visual_update for that.
Sourcepub fn needs_composite_frame(self: RenderHandle<Self>, app: &App) -> bool
pub fn needs_composite_frame(self: RenderHandle<Self>, app: &App) -> bool
Whether this view must be composited on the next frame.
This flag is cleared once the view gets successfully composited.
Sourcepub fn mark_needs_composite_frame(self: RenderHandle<Self>, app: &mut App)
pub fn mark_needs_composite_frame(self: RenderHandle<Self>, app: &mut App)
Marks this view required to be composited on the next frame.
This happens by the PipelineOwner during
flush_paint if there are any render objects that
need to be painted. It is also set for a new view, for the warm-up frame, and when the
app is resumed from the background.
Sourcepub fn hit_test(
self: RenderHandle<Self>,
app: &mut App,
result: &mut HitTestResult,
position: Offset,
) -> bool
pub fn hit_test( self: RenderHandle<Self>, app: &mut App, result: &mut HitTestResult, position: Offset, ) -> bool
Determines the set of render objects located at the given position.
Returns true if the given point is contained in this render object or one of its descendants. Adds any render objects that contain the point to the given hit test result.
The position argument is in the coordinate system of the render view, which is to say,
in logical pixels. This is not necessarily the same coordinate system as that expected by
the root layer (which is in physical pixels).
Sourcepub fn composite_frame(self: RenderHandle<Self>, app: &mut App)
pub fn composite_frame(self: RenderHandle<Self>, app: &mut App)
Uploads the composited layer tree to the host.
Actually causes the output of the rendering pipeline to appear on screen.
Sourcepub fn paint_bounds(self: RenderHandle<Self>, app: &App) -> Rect
pub fn paint_bounds(self: RenderHandle<Self>, app: &App) -> Rect
An estimate of the bounds within which this render object will paint, in physical pixels.
Trait Implementations§
Source§impl RenderObject for RenderView
impl RenderObject for RenderView
Source§fn render_object_data(self: RenderHandle<Self>, app: &App) -> &RenderObjectData
fn render_object_data(self: RenderHandle<Self>, app: &App) -> &RenderObjectData
Source§fn render_object_data_mut(
self: RenderHandle<Self>,
app: &mut App,
) -> &mut RenderObjectData
fn render_object_data_mut( self: RenderHandle<Self>, app: &mut App, ) -> &mut RenderObjectData
render_object_data.Source§fn perform_resize(self: RenderHandle<Self>, _app: &mut App)
fn perform_resize(self: RenderHandle<Self>, _app: &mut App)
Source§fn perform_layout(self: RenderHandle<Self>, app: &mut App)
fn perform_layout(self: RenderHandle<Self>, app: &mut App)
Source§fn visit_children(
self: RenderHandle<Self>,
app: &App,
visitor: &mut dyn FnMut(AnyRenderObject),
)
fn visit_children( self: RenderHandle<Self>, app: &App, visitor: &mut dyn FnMut(AnyRenderObject), )
visitor for each immediate child.Source§fn apply_paint_transform(
self: RenderHandle<Self>,
app: &App,
child: AnyRenderObject,
transform: &mut Matrix4,
)
fn apply_paint_transform( self: RenderHandle<Self>, app: &App, child: AnyRenderObject, transform: &mut Matrix4, )
Source§fn is_repaint_boundary(self: RenderHandle<Self>, _app: &App) -> bool
fn is_repaint_boundary(self: RenderHandle<Self>, _app: &App) -> bool
Source§fn paint(
self: RenderHandle<Self>,
app: &mut App,
context: &mut PaintingContext,
offset: Offset,
)
fn paint( self: RenderHandle<Self>, app: &mut App, context: &mut PaintingContext, offset: Offset, )
Source§fn as_render_object(self: RenderHandle<Self>, app: &App) -> AnyRenderObject
fn as_render_object(self: RenderHandle<Self>, app: &App) -> AnyRenderObject
RenderObject: this object’s
type-erased handle, through the vtable the protocol recorded when it created it.Source§fn setup_parent_data(
self: RenderHandle<Self>,
app: &mut App,
child: AnyRenderObject,
)
fn setup_parent_data( self: RenderHandle<Self>, app: &mut App, child: AnyRenderObject, )
child if it has none. Read moreSource§fn did_attach(
self: RenderHandle<Self>,
app: &mut App,
owner: Handle<PipelineOwner>,
)
fn did_attach( self: RenderHandle<Self>, app: &mut App, owner: Handle<PipelineOwner>, )
attach override after super.attach(owner); the base body has
already run. The default attaches the children reported by
visit_children.Source§fn did_detach(self: RenderHandle<Self>, app: &mut App)
fn did_detach(self: RenderHandle<Self>, app: &mut App)
detach override after super.detach(). The default detaches
the children reported by visit_children.Source§fn redepth_children(self: RenderHandle<Self>, app: &mut App)
fn redepth_children(self: RenderHandle<Self>, app: &mut App)
visit_children.Source§fn sized_by_parent(self: RenderHandle<Self>, _app: &App) -> bool
fn sized_by_parent(self: RenderHandle<Self>, _app: &App) -> bool
Source§fn always_needs_compositing(self: RenderHandle<Self>, _app: &App) -> bool
fn always_needs_compositing(self: RenderHandle<Self>, _app: &App) -> bool
Source§fn mouse_tracker_annotation(
self: RenderHandle<Self>,
_app: &App,
) -> Option<MouseTrackerAnnotation>
fn mouse_tracker_annotation( self: RenderHandle<Self>, _app: &App, ) -> Option<MouseTrackerAnnotation>
this is MouseTrackerAnnotation: the annotation this render object implements,
read live each time the mouse tracker consults it. None for a render object that is
not an annotation, which is the default.Source§fn update_composited_layer(
self: RenderHandle<Self>,
app: &mut App,
old_layer: Option<AnyOffsetLayer>,
) -> AnyOffsetLayer
fn update_composited_layer( self: RenderHandle<Self>, app: &mut App, old_layer: Option<AnyOffsetLayer>, ) -> AnyOffsetLayer
Source§fn show_on_screen(
self: RenderHandle<Self>,
app: &mut App,
descendant: Option<AnyRenderObject>,
rect: Option<Rect>,
duration: Duration,
curve: Rc<dyn Curve>,
)
fn show_on_screen( self: RenderHandle<Self>, app: &mut App, descendant: Option<AnyRenderObject>, rect: Option<Rect>, duration: Duration, curve: Rc<dyn Curve>, )
RenderObject visible on screen. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for RenderView
impl !Send for RenderView
impl !Sync for RenderView
impl !UnwindSafe for RenderView
impl Freeze for RenderView
impl Unpin for RenderView
impl UnsafeUnpin for RenderView
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> RenderObjectBase for Twhere
T: RenderObject,
impl<T> RenderObjectBase for Twhere
T: RenderObject,
Source§fn dispose(self: RenderHandle<Self>, app: &mut App)
fn dispose(self: RenderHandle<Self>, app: &mut App)
RenderObject.dispose body: releases the layer handle. An override calls it
last, where Dart writes super.dispose().Source§fn mark_needs_layout(self: RenderHandle<Self>, app: &mut App)
fn mark_needs_layout(self: RenderHandle<Self>, app: &mut App)
RenderObject.markNeedsLayout body; an override calls it where Dart writes
super.markNeedsLayout().Source§fn show_on_screen(
self: RenderHandle<Self>,
app: &mut App,
descendant: Option<AnyRenderObject>,
rect: Option<Rect>,
duration: Duration,
curve: Rc<dyn Curve>,
)
fn show_on_screen( self: RenderHandle<Self>, app: &mut App, descendant: Option<AnyRenderObject>, rect: Option<Rect>, duration: Duration, curve: Rc<dyn Curve>, )
RenderObject.showOnScreen.