pub trait ContainerExt: 'static {
Show 31 methods fn add(&self, widget: &impl IsA<Widget>); fn check_resize(&self); fn child_notify(&self, child: &impl IsA<Widget>, child_property: &str); fn child_notify_by_pspec(
        &self,
        child: &impl IsA<Widget>,
        pspec: impl AsRef<ParamSpec>
    ); fn child_type(&self) -> Type; fn forall<P: FnMut(&Widget)>(&self, callback: P); fn foreach<P: FnMut(&Widget)>(&self, callback: P); fn border_width(&self) -> u32; fn children(&self) -> Vec<Widget>; fn focus_child(&self) -> Option<Widget>; fn focus_hadjustment(&self) -> Option<Adjustment>; fn focus_vadjustment(&self) -> Option<Adjustment>; fn path_for_child(&self, child: &impl IsA<Widget>) -> Option<WidgetPath>; fn propagate_draw(&self, child: &impl IsA<Widget>, cr: &Context); fn remove(&self, widget: &impl IsA<Widget>); fn set_border_width(&self, border_width: u32); fn set_focus_chain(&self, focusable_widgets: &[Widget]); fn set_focus_child(&self, child: Option<&impl IsA<Widget>>); fn set_focus_hadjustment(&self, adjustment: &impl IsA<Adjustment>); fn set_focus_vadjustment(&self, adjustment: &impl IsA<Adjustment>); fn unset_focus_chain(&self); fn set_child<P: IsA<Widget>>(&self, child: Option<&P>); fn resize_mode(&self) -> ResizeMode; fn set_resize_mode(&self, resize_mode: ResizeMode); fn connect_add<F: Fn(&Self, &Widget) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_check_resize<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_remove<F: Fn(&Self, &Widget) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_set_focus_child<F: Fn(&Self, &Widget) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_border_width_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_child_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_resize_mode_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
}
Expand description

Required Methods

Adds widget to self. Typically used for simple containers such as Window, Frame, or Button; for more complicated layout containers such as Box or Grid, this function will pick default packing parameters that may not be correct. So consider functions such as BoxExt::pack_start() and GridExt::attach() as an alternative to add() in those cases. A widget may be added to only one container at a time; you can’t place the same widget inside two different containers.

Note that some containers, such as ScrolledWindow or ListBox, may add intermediate children between the added widget and the container.

widget

a widget to be placed inside self

Emits a signal::Widget::child-notify signal for the [child property][child-properties] child_property on the child.

This is an analogue of [ObjectExtManual::notify()][crate::glib::prelude::ObjectExtManual::notify()] for child properties.

Also see WidgetExt::child_notify().

child

the child widget

child_property

the name of a child property installed on the class of self

Emits a signal::Widget::child-notify signal for the [child property][child-properties] specified by pspec on the child.

This is an analogue of [ObjectExtManual::notify_by_pspec()][crate::glib::prelude::ObjectExtManual::notify_by_pspec()] for child properties.

child

the child widget

pspec

the glib::ParamSpec of a child property instealled on the class of self

Implementors