Trait gtk::prelude::ButtonBoxExt
source · [−]pub trait ButtonBoxExt: 'static {
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
Required Methods
fn child_is_non_homogeneous(&self, child: &impl IsA<Widget>) -> bool
fn child_is_non_homogeneous(&self, child: &impl IsA<Widget>) -> bool
fn child_is_secondary(&self, child: &impl IsA<Widget>) -> bool
fn child_is_secondary(&self, child: &impl IsA<Widget>) -> bool
fn layout(&self) -> ButtonBoxStyle
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
.
fn set_child_non_homogeneous(
&self,
child: &impl IsA<Widget>,
non_homogeneous: bool
)
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
fn set_child_secondary(&self, child: &impl IsA<Widget>, is_secondary: bool)
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.