Trait gtk::prelude::ExpanderExt [−][src]
pub trait ExpanderExt: 'static {}Show methods
fn is_expanded(&self) -> bool; fn label(&self) -> Option<GString>; fn is_label_fill(&self) -> bool; fn label_widget(&self) -> Option<Widget>; fn resizes_toplevel(&self) -> bool; fn spacing(&self) -> i32; fn uses_markup(&self) -> bool; fn uses_underline(&self) -> bool; fn set_expanded(&self, expanded: bool); fn set_label(&self, label: Option<&str>); fn set_label_fill(&self, label_fill: bool); fn set_label_widget<P: IsA<Widget>>(&self, label_widget: Option<&P>); fn set_resize_toplevel(&self, resize_toplevel: bool); fn set_spacing(&self, spacing: i32); fn set_use_markup(&self, use_markup: bool); fn set_use_underline(&self, use_underline: bool); fn connect_activate<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId; fn emit_activate(&self); fn connect_expanded_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_label_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_label_fill_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_label_widget_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_resize_toplevel_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_spacing_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_use_markup_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_use_underline_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
Expand description
Required methods
fn is_expanded(&self) -> bool
fn is_expanded(&self) -> bool
Queries a Expander
and returns its current state. Returns true
if the child widget is revealed.
See set_expanded()
.
Returns
the current state of the expander
Fetches the text from a label widget including any embedded
underlines indicating mnemonics and Pango markup, as set by
set_label()
. If the label text has not been set the
return value will be None
. This will be the case if you create an
empty button with Button::new()
to use as a container.
Note that this function behaved differently in versions prior to 2.14 and used to return the label text stripped of embedded underlines indicating mnemonics and Pango markup. This problem can be avoided by fetching the label text directly from the label widget.
Returns
The text of the label widget. This string is owned by the widget and must not be modified or freed.
fn is_label_fill(&self) -> bool
fn is_label_fill(&self) -> bool
fn label_widget(&self) -> Option<Widget>
fn label_widget(&self) -> Option<Widget>
Retrieves the label widget for the frame. See
set_label_widget()
.
Returns
the label widget,
or None
if there is none
fn resizes_toplevel(&self) -> bool
fn resizes_toplevel(&self) -> bool
Returns whether the expander will resize the toplevel widget containing the expander upon resizing and collpasing.
Returns
the “resize toplevel” setting.
Gets the value set by set_spacing()
.
Deprecated since 3.20
Use margins on the child instead.
Returns
spacing between the expander and child
fn uses_markup(&self) -> bool
fn uses_markup(&self) -> bool
Returns whether the label’s text is interpreted as marked up with
the [Pango text markup language][PangoMarkupFormat].
See set_use_markup()
.
Returns
true
if the label’s text will be parsed for markup
fn uses_underline(&self) -> bool
fn uses_underline(&self) -> bool
Returns whether an embedded underline in the expander label
indicates a mnemonic. See set_use_underline()
.
Returns
true
if an embedded underline in the expander
label indicates the mnemonic accelerator keys
fn set_expanded(&self, expanded: bool)
fn set_expanded(&self, expanded: bool)
Sets the text of the label of the expander to label
.
This will also clear any previously set labels.
label
a string
fn set_label_fill(&self, label_fill: bool)
fn set_label_fill(&self, label_fill: bool)
Sets whether the label widget should fill all available
horizontal space allocated to self
.
label_fill
true
if the label should should fill
all available horizontal space
Set the label widget for the expander. This is the widget that will appear embedded alongside the expander arrow.
label_widget
the new label widget
fn set_resize_toplevel(&self, resize_toplevel: bool)
fn set_resize_toplevel(&self, resize_toplevel: bool)
Sets whether the expander will resize the toplevel widget containing the expander upon resizing and collpasing.
resize_toplevel
whether to resize the toplevel
fn set_spacing(&self, spacing: i32)
fn set_spacing(&self, spacing: i32)
Sets the spacing field of self
, which is the number of
pixels to place between expander and the child.
Deprecated since 3.20
Use margins on the child instead.
spacing
distance between the expander and child in pixels
fn set_use_markup(&self, use_markup: bool)
fn set_use_markup(&self, use_markup: bool)
Sets whether the text of the label contains markup in
[Pango’s text markup language][PangoMarkupFormat].
See LabelExt::set_markup()
.
use_markup
true
if the label’s text should be parsed for markup
fn set_use_underline(&self, use_underline: bool)
fn set_use_underline(&self, use_underline: bool)
If true, an underline in the text of the expander label indicates the next character should be used for the mnemonic accelerator key.
use_underline
true
if underlines in the text indicate mnemonics
fn connect_activate<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn emit_activate(&self)
fn connect_expanded_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
fn connect_label_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_label_fill_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
fn connect_label_widget_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
fn connect_resize_toplevel_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
fn connect_spacing_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
fn connect_use_markup_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
fn connect_use_underline_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId