pub fn content_box(context: WidgetContext) -> WidgetNode {
    let WidgetContext {
        id,
        props,
        listed_slots,
        ..
    } = context;

    let ContentBoxProps {
        clipping,
        transform,
    } = props.read_cloned_or_default();

    let items = listed_slots
        .into_iter()
        .filter_map(|slot| {
            if let Some(props) = slot.props() {
                let layout = props.read_cloned_or_default::<ContentBoxItemLayout>();
                Some(ContentBoxItemNode { slot, layout })
            } else {
                None
            }
        })
        .collect::<Vec<_>>();

    widget! {{{
        ContentBoxNode {
            id: id.to_owned(),
            props: props.clone(),
            items,
            clipping,
            transform,
        }
    }}}
}
/// A generic container for other widgets
///
/// [`content_box`]'s serve two basic purposes: allowing you to apply transformations and clipping
/// to all contained widgets and giving contained widgets more control over their layout inside of
/// the box.
///
/// # Transform & Clipping
///
/// The transformation and clipping options on the [`content_box`] can be set by setting the
/// [`ContentBoxProps`] on the component.
///
/// # Child Widget Layout
///
/// With a [`content_box`] you can get more control over the layout of it's children by adding the
/// [`ContentBoxItemLayout`] properties to any of it's children.
A generic container for other widgets
[`content_box`]'s serve two basic purposes: allowing you to apply transformations and clipping
to all contained widgets and giving contained widgets more control over their layout inside of
the box.
A generic container for other widgets [ ` content_box ` ] ' s serve two basic purposes : allowing you to apply transformations and clipping to all contained widgets and giving contained widgets more control over their layout inside of the box .
pub fn content_box(context: WidgetContext) -> WidgetNode {
    let WidgetContext {
        id,
        props,
        listed_slots,
        ..
    } = context;
    let ContentBoxProps {
        clipping,
        transform,
    } = props.read_cloned_or_default();
    let items = listed_slots
        .into_iter()
        .filter_map(|slot| {
            if let Some(props) = slot.props() {
                let layout = props.read_cloned_or_default::<ContentBoxItemLayout>();
                Some(ContentBoxItemNode { slot, layout })
            } else {
                None
            }
        })
        .collect::<Vec<_>>();
    widget! {{{
        ContentBoxNode {
            id: id.to_owned(),
            props: props.clone(),
            items,
            clipping,
            transform,
        }
    }}}
}
pub fn content_box ( context : WidgetContext ) -> WidgetNode { let WidgetContext { id , props , listed_slots , .. } = context ; let ContentBoxProps { clipping , transform , } = props . read_cloned_or_default ( ) ; let items = listed_slots . into_iter ( ) . filter_map ( | slot | { if let Some ( props ) = slot . props ( ) { let layout = props . read_cloned_or_default :: < ContentBoxItemLayout > ( ) ; Some ( ContentBoxItemNode { slot , layout } ) } else { None } } ) . collect :: < Vec < _ > > ( ) ; widget ! { { { ContentBoxNode { id id to_owned ( ) props props clone ( ) items clipping transform } } } } }
A generic container for other widgets
[`content_box`]'s serve two basic purposes: allowing you to apply transformations and clipping
to all contained widgets and giving contained widgets more control over their layout inside of
the box.
A generic container for other widgets [ ` content_box ` ] ' s serve two basic purposes : allowing you to apply transformations and clipping to all contained widgets and giving contained widgets more control over their layout inside of the box .
context
WidgetContext
context
WidgetContext
transform & clipping
The transformation and clipping options on the [`content_box`] can be set by setting the
[`ContentBoxProps`] on the component.
The transformation and clipping options on the [ ` content_box ` ] can be set by setting the [ ` ContentBoxProps ` ] on the component .
child widget layout
With a [`content_box`] you can get more control over the layout of it's children by adding the
[`ContentBoxItemLayout`] properties to any of it's children.
With a [ ` content_box ` ] you can get more control over the layout of it ' s children by adding the [ ` ContentBoxItemLayout ` ] properties to any of it ' s children .