Trait gtk::prelude::SizeGroupExt[][src]

pub trait SizeGroupExt: 'static {
    fn add_widget<P: IsA<Widget>>(&self, widget: &P);
fn ignores_hidden(&self) -> bool;
fn mode(&self) -> SizeGroupMode;
fn widgets(&self) -> Vec<Widget>;
fn remove_widget<P: IsA<Widget>>(&self, widget: &P);
fn set_ignore_hidden(&self, ignore_hidden: bool);
fn set_mode(&self, mode: SizeGroupMode);
fn connect_ignore_hidden_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_mode_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; }
Expand description

Trait containing all SizeGroup methods.

Implementors

SizeGroup

Required methods

Adds a widget to a SizeGroup. In the future, the requisition of the widget will be determined as the maximum of its requisition and the requisition of the other widgets in the size group. Whether this applies horizontally, vertically, or in both directions depends on the mode of the size group. See set_mode().

When the widget is destroyed or no longer referenced elsewhere, it will be removed from the size group.

widget

the Widget to add

Returns if invisible widgets are ignored when calculating the size.

Deprecated since 3.22

Measuring the size of hidden widgets has not worked reliably for a long time. In most cases, they will report a size of 0 nowadays, and thus, their size will not affect the other size group members. In effect, size groups will always operate as if this property was true. Use a Stack instead to hide widgets while still having their size taken into account.

Returns

true if invisible widgets are ignored.

Gets the current mode of the size group. See set_mode().

Returns

the current mode of the size group.

Returns the list of widgets associated with self.

Returns

a GSList of widgets. The list is owned by GTK+ and should not be modified.

Removes a widget from a SizeGroup.

widget

the Widget to remove

Sets whether unmapped widgets should be ignored when calculating the size.

Deprecated since 3.22

Measuring the size of hidden widgets has not worked reliably for a long time. In most cases, they will report a size of 0 nowadays, and thus, their size will not affect the other size group members. In effect, size groups will always operate as if this property was true. Use a Stack instead to hide widgets while still having their size taken into account.

ignore_hidden

whether unmapped widgets should be ignored when calculating the size

Sets the SizeGroupMode of the size group. The mode of the size group determines whether the widgets in the size group should all have the same horizontal requisition (SizeGroupMode::Horizontal) all have the same vertical requisition (SizeGroupMode::Vertical), or should all have the same requisition in both directions (SizeGroupMode::Both).

mode

the mode to set for the size group.

Implementors