[][src]Trait gtk::BoxExt

pub trait BoxExt: 'static {
    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<P: IsA<Widget>>(&self, widget: Option<&P>);
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);
fn connect_property_baseline_position_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_homogeneous_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_spacing_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; }

Trait containing all Box methods.

Implementors

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

Required methods

fn get_baseline_position(&self) -> BaselinePosition

Gets the value set by BoxExt::set_baseline_position.

Returns

the baseline position

fn get_center_widget(&self) -> Option<Widget>

Retrieves the center widget of the box.

Returns

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

fn get_homogeneous(&self) -> bool

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

Returns

true if the box is homogeneous.

fn get_spacing(&self) -> i32

Gets the value set by BoxExt::set_spacing.

Returns

spacing between children

fn pack_end<P: IsA<Widget>>(
    &self,
    child: &P,
    expand: bool,
    fill: bool,
    padding: u32
)

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

fn pack_start<P: IsA<Widget>>(
    &self,
    child: &P,
    expand: bool,
    fill: bool,
    padding: u32
)

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

fn query_child_packing<P: IsA<Widget>>(
    &self,
    child: &P
) -> (bool, bool, u32, PackType)

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

fn reorder_child<P: IsA<Widget>>(&self, child: &P, position: i32)

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

fn set_baseline_position(&self, position: BaselinePosition)

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

fn set_center_widget<P: IsA<Widget>>(&self, widget: Option<&P>)

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

fn set_child_packing<P: IsA<Widget>>(
    &self,
    child: &P,
    expand: bool,
    fill: bool,
    padding: u32,
    pack_type: PackType
)

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

fn set_homogeneous(&self, homogeneous: bool)

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

fn set_spacing(&self, spacing: i32)

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

fn get_child_position<T: IsA<Widget>>(&self, item: &T) -> i32

fn set_child_position<T: IsA<Widget>>(&self, item: &T, position: i32)

fn connect_property_baseline_position_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_homogeneous_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_spacing_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

Loading content...

Implementors

impl<O: IsA<Box>> BoxExt for O[src]

Loading content...