Trait gtk::BoxExt [] [src]

pub trait BoxExt {
    fn get_baseline_position(&self) -> BaselinePosition;
    fn get_center_widget(&self) -> Option<Widget>;
    fn get_homogeneous(&self) -> bool;
    fn get_spacing(&self) -> i32;
    fn pack_end<P: IsA<Widget>>(&self,
                                child: &P,
                                expand: bool,
                                fill: bool,
                                padding: u32); fn pack_start<P: IsA<Widget>>(&self,
                                  child: &P,
                                  expand: bool,
                                  fill: bool,
                                  padding: u32); fn query_child_packing<P: IsA<Widget>>(&self,
                                           child: &P)
                                           -> (bool, bool, u32, PackType); fn reorder_child<P: IsA<Widget>>(&self, child: &P, position: i32); fn set_baseline_position(&self, position: BaselinePosition); fn set_center_widget<'a, P: IsA<Widget> + 'a, Q: Into<Option<&'a P>>>(&self,
                                                                          widget: Q); fn set_child_packing<P: IsA<Widget>>(&self,
                                         child: &P,
                                         expand: bool,
                                         fill: bool,
                                         padding: u32,
                                         pack_type: PackType); fn set_homogeneous(&self, homogeneous: bool); fn set_spacing(&self, spacing: i32); fn get_child_position<T: IsA<Widget>>(&self, item: &T) -> i32; fn set_child_position<T: IsA<Widget>>(&self, item: &T, position: i32); }

Trait containing all Box methods.

Implementors

AppChooserWidget, Box, ButtonBox, ColorChooserWidget, FileChooserWidget, FontChooserWidget, InfoBar, RecentChooserWidget, StackSwitcher, Statusbar

Required Methods

Gets the value set by BoxExt::set_baseline_position.

Feature: v3_10

Returns

the baseline position

Retrieves the center widget of the box.

Feature: v3_12

Returns

the center widget

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

Returns

true if the box is homogeneous.

Gets the value set by BoxExt::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 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 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

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.

Feature: v3_10

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.

Feature: v3_12

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 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 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