pub struct AnyContainerLayer { /* private fields */ }Expand description
Erased ContainerLayer.
Implementations§
Source§impl AnyContainerLayer
impl AnyContainerLayer
pub fn id(self) -> HandleId
Sourcepub fn as_offset_layer(self) -> Option<AnyOffsetLayer>
pub fn as_offset_layer(self) -> Option<AnyOffsetLayer>
Dart’s layer as OffsetLayer, as an Option.
Sourcepub fn first_child(self, app: &App) -> Option<AnyLayer>
pub fn first_child(self, app: &App) -> Option<AnyLayer>
The first composited layer in this layer’s child list.
Sourcepub fn last_child(self, app: &App) -> Option<AnyLayer>
pub fn last_child(self, app: &App) -> Option<AnyLayer>
The last composited layer in this layer’s child list.
Sourcepub fn has_children(self, app: &App) -> bool
pub fn has_children(self, app: &App) -> bool
Returns whether this layer has at least one child layer.
Sourcepub fn build_scene(self, app: &mut App, builder: SceneBuilder) -> Scene
pub fn build_scene(self, app: &mut App, builder: SceneBuilder) -> Scene
Consider this layer as the root and build a scene (a tree of layers) in the engine.
Sourcepub fn append(self, app: &mut App, child: AnyLayer)
pub fn append(self, app: &mut App, child: AnyLayer)
Adds the given layer to the end of this layer’s child list.
Sourcepub fn redepth_child(self, app: &mut App, child: AnyLayer)
pub fn redepth_child(self, app: &mut App, child: AnyLayer)
Adjust the depth of the given child to be greater than this node’s own depth.
Only call this method from overrides of Layer::redepth_children.
Sourcepub fn remove_all_children(self, app: &mut App)
pub fn remove_all_children(self, app: &mut App)
Removes all of this layer’s children from its child list.
Sourcepub fn add_children_to_scene(self, app: &mut App, builder: &mut SceneBuilder)
pub fn add_children_to_scene(self, app: &mut App, builder: &mut SceneBuilder)
Uploads all of this layer’s children to the engine.
This method is typically used by add_to_scene to insert the children into the scene.
Subclasses of ContainerLayer typically override add_to_scene to apply effects to
the scene using the SceneBuilder API, then insert their children using
add_children_to_scene, then reverse the aforementioned effects before returning from
add_to_scene.
Sourcepub fn depth_first_iterate_children(self, app: &App) -> Vec<AnyLayer>
pub fn depth_first_iterate_children(self, app: &App) -> Vec<AnyLayer>
Returns the descendants of this layer in depth first order.
Trait Implementations§
Source§impl Clone for AnyContainerLayer
impl Clone for AnyContainerLayer
impl Copy for AnyContainerLayer
Source§impl Debug for AnyContainerLayer
impl Debug for AnyContainerLayer
impl Eq for AnyContainerLayer
Source§impl ErasedLayer for AnyContainerLayer
impl ErasedLayer for AnyContainerLayer
Source§impl From<AnyContainerLayer> for HandleId
impl From<AnyContainerLayer> for HandleId
Source§fn from(layer: AnyContainerLayer) -> HandleId
fn from(layer: AnyContainerLayer) -> HandleId
Source§impl Hash for AnyContainerLayer
impl Hash for AnyContainerLayer
Auto Trait Implementations§
impl Freeze for AnyContainerLayer
impl RefUnwindSafe for AnyContainerLayer
impl Send for AnyContainerLayer
impl Sync for AnyContainerLayer
impl Unpin for AnyContainerLayer
impl UnsafeUnpin for AnyContainerLayer
impl UnwindSafe for AnyContainerLayer
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.