Skip to main content

SizeGroupExt

Trait SizeGroupExt 

Source
pub trait SizeGroupExt: IsA<SizeGroup> + 'static {
    // Provided methods
    fn add_widget(&self, widget: &impl IsA<Widget>) { ... }
    fn mode(&self) -> SizeGroupMode { ... }
    fn widgets(&self) -> Vec<Widget> { ... }
    fn remove_widget(&self, widget: &impl IsA<Widget>) { ... }
    fn set_mode(&self, mode: SizeGroupMode) { ... }
    fn connect_mode_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId { ... }
}
Expand description

Trait containing all SizeGroup methods.

§Implementors

SizeGroup

Provided Methods§

Source

fn add_widget(&self, widget: &impl IsA<Widget>)

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

Source

fn mode(&self) -> SizeGroupMode

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

§Returns

the current mode of the size group.

Source

fn widgets(&self) -> Vec<Widget>

Returns the list of widgets associated with self.

§Returns

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

Source

fn remove_widget(&self, widget: &impl IsA<Widget>)

Removes a widget from a SizeGroup.

§widget

the Widget to remove

Source

fn set_mode(&self, mode: SizeGroupMode)

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.

Source

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§