[−][src]Trait gtk::ExpanderExt
Required methods
fn get_expanded(&self) -> bool
Queries a Expander
and returns its current state. Returns true
if the child widget is revealed.
See ExpanderExt::set_expanded
.
Returns
the current state of the expander
fn get_label(&self) -> Option<GString>
Fetches the text from a label widget including any embedded
underlines indicating mnemonics and Pango markup, as set by
ExpanderExt::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 get_label_fill(&self) -> bool
Returns whether the label widget will fill all available
horizontal space allocated to self
.
Returns
true
if the label widget will fill all
available horizontal space
fn get_label_widget(&self) -> Option<Widget>
Retrieves the label widget for the frame. See
ExpanderExt::set_label_widget
.
Returns
the label widget,
or None
if there is none
fn get_resize_toplevel(&self) -> bool
Returns whether the expander will resize the toplevel widget containing the expander upon resizing and collpasing.
Returns
the “resize toplevel” setting.
fn get_spacing(&self) -> i32
Gets the value set by ExpanderExt::set_spacing
.
Deprecated since 3.20
Use margins on the child instead.
Returns
spacing between the expander and child
fn get_use_markup(&self) -> bool
Returns whether the label’s text is interpreted as marked up with
the [Pango text markup language][PangoMarkupFormat].
See ExpanderExt::set_use_markup
.
Returns
true
if the label’s text will be parsed for markup
fn get_use_underline(&self) -> bool
Returns whether an embedded underline in the expander label
indicates a mnemonic. See ExpanderExt::set_use_underline
.
Returns
true
if an embedded underline in the expander
label indicates the mnemonic accelerator keys
fn set_expanded(&self, expanded: bool)
Sets the state of the expander. Set to true
, if you want
the child widget to be revealed, and false
if you want the
child widget to be hidden.
expanded
whether the child widget is revealed
fn set_label(&self, label: Option<&str>)
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)
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
fn set_label_widget<P: IsA<Widget>>(&self, label_widget: Option<&P>)
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)
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)
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)
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)
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_property_expanded_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_label_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_label_fill_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_label_widget_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_resize_toplevel_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_spacing_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_use_markup_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_use_underline_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
Implementors
impl<O: IsA<Expander>> ExpanderExt for O
[src]
fn get_expanded(&self) -> bool
[src]
fn get_label(&self) -> Option<GString>
[src]
fn get_label_fill(&self) -> bool
[src]
fn get_label_widget(&self) -> Option<Widget>
[src]
fn get_resize_toplevel(&self) -> bool
[src]
fn get_spacing(&self) -> i32
[src]
fn get_use_markup(&self) -> bool
[src]
fn get_use_underline(&self) -> bool
[src]
fn set_expanded(&self, expanded: bool)
[src]
fn set_label(&self, label: Option<&str>)
[src]
fn set_label_fill(&self, label_fill: bool)
[src]
fn set_label_widget<P: IsA<Widget>>(&self, label_widget: Option<&P>)
[src]
fn set_resize_toplevel(&self, resize_toplevel: bool)
[src]
fn set_spacing(&self, spacing: i32)
[src]
fn set_use_markup(&self, use_markup: bool)
[src]
fn set_use_underline(&self, use_underline: bool)
[src]
fn connect_activate<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
[src]
fn emit_activate(&self)
[src]
fn connect_property_expanded_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_label_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_label_fill_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_label_widget_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_resize_toplevel_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_spacing_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_use_markup_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_use_underline_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId