Skip to main content

ButtonBoxExt

Trait ButtonBoxExt 

Source
pub trait ButtonBoxExt:
    IsA<ButtonBox>
    + Sealed
    + 'static {
    // Provided methods
    fn child_is_non_homogeneous(&self, child: &impl IsA<Widget>) -> bool { ... }
    fn child_is_secondary(&self, child: &impl IsA<Widget>) -> bool { ... }
    fn layout(&self) -> ButtonBoxStyle { ... }
    fn set_child_non_homogeneous(
        &self,
        child: &impl IsA<Widget>,
        non_homogeneous: bool,
    ) { ... }
    fn set_child_secondary(&self, child: &impl IsA<Widget>, is_secondary: bool) { ... }
    fn set_layout(&self, layout_style: ButtonBoxStyle) { ... }
    fn layout_style(&self) -> ButtonBoxStyle { ... }
    fn set_layout_style(&self, layout_style: ButtonBoxStyle) { ... }
    fn connect_layout_style_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId { ... }
}
Expand description

Trait containing all ButtonBox methods.

§Implementors

ButtonBox

Provided Methods§

Source

fn child_is_non_homogeneous(&self, child: &impl IsA<Widget>) -> bool

Returns whether the child is exempted from homogenous sizing.

§child

a child of self

§Returns

true if the child is not subject to homogenous sizing

Source

fn child_is_secondary(&self, child: &impl IsA<Widget>) -> bool

Returns whether child should appear in a secondary group of children.

§child

a child of self

§Returns

whether child should appear in a secondary group of children.

Source

fn layout(&self) -> ButtonBoxStyle

Retrieves the method being used to arrange the buttons in a button box.

§Returns

the method used to lay out buttons in self.

Source

fn set_child_non_homogeneous( &self, child: &impl IsA<Widget>, non_homogeneous: bool, )

Sets whether the child is exempted from homogeous sizing.

§child

a child of self

§non_homogeneous

the new value

Source

fn set_child_secondary(&self, child: &impl IsA<Widget>, is_secondary: bool)

Sets whether child should appear in a secondary group of children. A typical use of a secondary child is the help button in a dialog.

This group appears after the other children if the style is ButtonBoxStyle::Start, ButtonBoxStyle::Spread or ButtonBoxStyle::Edge, and before the other children if the style is ButtonBoxStyle::End. For horizontal button boxes, the definition of before/after depends on direction of the widget (see WidgetExt::set_direction()). If the style is ButtonBoxStyle::Start or ButtonBoxStyle::End, then the secondary children are aligned at the other end of the button box from the main children. For the other styles, they appear immediately next to the main children.

§child

a child of self

§is_secondary

if true, the child appears in a secondary group of the button box.

Source

fn set_layout(&self, layout_style: ButtonBoxStyle)

Changes the way buttons are arranged in their container.

§layout_style

the new layout style

Source

fn layout_style(&self) -> ButtonBoxStyle

Source

fn set_layout_style(&self, layout_style: ButtonBoxStyle)

Source

fn connect_layout_style_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§