Type Alias zng_app::widget::node::BoxedUiNodeList

source ·
pub type BoxedUiNodeList = Box<dyn UiNodeListBoxed>;
Expand description

An UiNodeList in a box.

Aliased Type§

struct BoxedUiNodeList(/* private fields */);

Trait Implementations§

source§

impl UiNodeList for BoxedUiNodeList

source§

fn with_node<R, F>(&mut self, index: usize, f: F) -> R
where F: FnOnce(&mut BoxedUiNode) -> R,

Visit the specific node. Read more
source§

fn for_each<F>(&mut self, f: F)
where F: FnMut(usize, &mut BoxedUiNode),

Calls f for each node in the list with the index, sequentially.
source§

fn par_each<F>(&mut self, f: F)
where F: Fn(usize, &mut BoxedUiNode) + Send + Sync,

Calls f for each node in the list with the index, in parallel.
source§

fn par_fold_reduce<T, I, F, R>(&mut self, identity: I, fold: F, reduce: R) -> T
where T: Send + 'static, I: Fn() -> T + Send + Sync, F: Fn(T, usize, &mut BoxedUiNode) -> T + Send + Sync, R: Fn(T, T) -> T + Send + Sync,

Calls fold for each node in the list in parallel, with fold accumulators produced by identity, then merges the folded results using reduce to produce the final value also in parallel. Read more
source§

fn len(&self) -> usize

Gets the current number of nodes in the list.
source§

fn boxed(self) -> BoxedUiNodeList

Gets self boxed, or itself if it is already boxed.
source§

fn actual_type_id(&self) -> TypeId

Returns the type_id of the unboxed list.
source§

fn drain_into(&mut self, vec: &mut Vec<BoxedUiNode>)

Move all nodes into vec.
source§

fn init_all(&mut self)

Init the list in a context, all nodes are also inited. Read more
source§

fn deinit_all(&mut self)

Deinit the list in a context, all nodes are also deinited. Read more
source§

fn update_all( &mut self, updates: &WidgetUpdates, observer: &mut dyn UiNodeListObserver, )

Receive updates for the list in a context, all nodes are also updated. Read more
source§

fn info_all(&mut self, info: &mut WidgetInfoBuilder)

Rebuilds the list in a context, all node info is rebuilt.
source§

fn event_all(&mut self, update: &EventUpdate)

Receive an event for the list in a context, all nodes are also notified. Read more
source§

fn render_all(&mut self, frame: &mut FrameBuilder)

Render all nodes. Read more
source§

fn render_update_all(&mut self, update: &mut FrameUpdate)

Render all nodes. Read more
source§

fn measure_each<F, S>( &mut self, wm: &mut WidgetMeasure, measure: F, fold_size: S, ) -> PxSize
where F: Fn(usize, &mut BoxedUiNode, &mut WidgetMeasure) -> PxSize + Send + Sync, S: Fn(PxSize, PxSize) -> PxSize + Send + Sync,

Call measure for each node and combines the final size using fold_size. Read more
source§

fn layout_each<F, S>( &mut self, wl: &mut WidgetLayout, layout: F, fold_size: S, ) -> PxSize
where F: Fn(usize, &mut BoxedUiNode, &mut WidgetLayout) -> PxSize + Send + Sync, S: Fn(PxSize, PxSize) -> PxSize + Send + Sync,

Call layout for each node and combines the final size using fold_size. Read more
source§

fn as_any(&mut self) -> &mut dyn Any
where Self: Sized,

Access to mut dyn Any methods.
source§

fn is_empty(&self) -> bool

Returns true if the list does not contain any nodes.
source§

fn downcast_unbox<L: UiNodeList>(self) -> Result<L, BoxedUiNodeList>
where Self: Sized,

Downcast to L, if self is L or is a BoxedUiNodeList that is L.
source§

fn op(&mut self, op: UiNodeOp<'_>)
where Self: Sized,

Runs the UiNodeOp.