Function zng::widget::node::extend_widget

source ยท
pub fn extend_widget(
    widget: impl UiNode,
    build_extension: impl FnOnce(Box<dyn UiNodeBoxed>) -> Box<dyn UiNodeBoxed>,
) -> impl UiNode
Expand description

Create a widget node that wraps the widget with any number of other non-widget nodes and still delegates with_context to the widget.

Note that the with_context is called in the context of widget, not in the context of the build_extension nodes. Other node operations are delegated to the build_extension nodes, and they in turn must delegate to the input child node that is widget.