pub trait BoxExt: 'static {
Show 18 methods fn baseline_position(&self) -> BaselinePosition; fn center_widget(&self) -> Option<Widget>; fn is_homogeneous(&self) -> bool; fn spacing(&self) -> i32; fn pack_end(
        &self,
        child: &impl IsA<Widget>,
        expand: bool,
        fill: bool,
        padding: u32
    ); fn pack_start(
        &self,
        child: &impl IsA<Widget>,
        expand: bool,
        fill: bool,
        padding: u32
    ); fn query_child_packing(
        &self,
        child: &impl IsA<Widget>
    ) -> (bool, bool, u32, PackType); fn reorder_child(&self, child: &impl IsA<Widget>, position: i32); fn set_baseline_position(&self, position: BaselinePosition); fn set_center_widget(&self, widget: Option<&impl IsA<Widget>>); fn set_child_packing(
        &self,
        child: &impl IsA<Widget>,
        expand: bool,
        fill: bool,
        padding: u32,
        pack_type: PackType
    ); fn set_homogeneous(&self, homogeneous: bool); fn set_spacing(&self, spacing: i32); fn child_position<T: IsA<Widget>>(&self, item: &T) -> i32; fn set_child_position<T: IsA<Widget>>(&self, item: &T, position: i32); fn connect_baseline_position_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_homogeneous_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_spacing_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
}
Expand description

Required Methods

Gets the value set by set_baseline_position().

Returns

the baseline position

Retrieves the center widget of the box.

Returns

the center widget or None in case no center widget is set.

Returns whether the box is homogeneous (all children are the same size). See set_homogeneous().

Returns

true if the box is homogeneous.

Gets the value set by set_spacing().

Returns

spacing between children

Adds child to self, packed with reference to the end of self. The child is packed after (away from end of) any other child packed with reference to the end of self.

child

the Widget to be added to self

expand

true if the new child is to be given extra space allocated to self. The extra space will be divided evenly between all children of self that use this option

fill

true if space given to child by the expand option is actually allocated to child, rather than just padding it. This parameter has no effect if expand is set to false. A child is always allocated the full height of a horizontal Box and the full width of a vertical Box. This option affects the other dimension

padding

extra space in pixels to put between this child and its neighbors, over and above the global amount specified by property::Box::spacing property. If child is a widget at one of the reference ends of self, then padding pixels are also put between child and the reference edge of self

Adds child to self, packed with reference to the start of self. The child is packed after any other child packed with reference to the start of self.

child

the Widget to be added to self

expand

true if the new child is to be given extra space allocated to self. The extra space will be divided evenly between all children that use this option

fill

true if space given to child by the expand option is actually allocated to child, rather than just padding it. This parameter has no effect if expand is set to false. A child is always allocated the full height of a horizontal Box and the full width of a vertical Box. This option affects the other dimension

padding

extra space in pixels to put between this child and its neighbors, over and above the global amount specified by property::Box::spacing property. If child is a widget at one of the reference ends of self, then padding pixels are also put between child and the reference edge of self

Obtains information about how child is packed into self.

child

the Widget of the child to query

Returns
expand

pointer to return location for expand child property

fill

pointer to return location for fill child property

padding

pointer to return location for padding child property

pack_type

pointer to return location for pack-type child property

Moves child to a new position in the list of self children. The list contains widgets packed PackType::Start as well as widgets packed PackType::End, in the order that these widgets were added to self.

A widget’s position in the self children list determines where the widget is packed into self. A child widget at some position in the list will be packed just after all other widgets of the same packing type that appear earlier in the list.

child

the Widget to move

position

the new position for child in the list of children of self, starting from 0. If negative, indicates the end of the list

Sets the baseline position of a box. This affects only horizontal boxes with at least one baseline aligned child. If there is more vertical space available than requested, and the baseline is not allocated by the parent then position is used to allocate the baseline wrt the extra space available.

position

a BaselinePosition

Sets a center widget; that is a child widget that will be centered with respect to the full width of the box, even if the children at either side take up different amounts of space.

widget

the widget to center

Sets the way child is packed into self.

child

the Widget of the child to set

expand

the new value of the expand child property

fill

the new value of the fill child property

padding

the new value of the padding child property

pack_type

the new value of the pack-type child property

Sets the property::Box::homogeneous property of self, controlling whether or not all children of self are given equal space in the box.

homogeneous

a boolean value, true to create equal allotments, false for variable allotments

Sets the property::Box::spacing property of self, which is the number of pixels to place between children of self.

spacing

the number of pixels to put between children

Implementors