pub trait ExpanderExt: IsA<Expander> + 'static {
Show 23 methods
// Provided 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 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(&self, label_widget: Option<&impl IsA<Widget>>) { ... }
fn set_resize_toplevel(&self, resize_toplevel: bool) { ... }
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_use_markup_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_use_underline_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
}Provided Methods§
Sourcefn 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
Sourcefn label(&self) -> Option<GString>
fn label(&self) -> Option<GString>
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.
Sourcefn is_label_fill(&self) -> bool
fn is_label_fill(&self) -> bool
Sourcefn 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
Sourcefn 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.
Sourcefn 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
Sourcefn 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
Sourcefn set_expanded(&self, expanded: bool)
fn set_expanded(&self, expanded: bool)
Sourcefn set_label(&self, label: Option<&str>)
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
Sourcefn set_label_fill(&self, label_fill: bool)
fn set_label_fill(&self, label_fill: bool)
Sourcefn set_label_widget(&self, label_widget: Option<&impl IsA<Widget>>)
fn set_label_widget(&self, label_widget: Option<&impl IsA<Widget>>)
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
Sourcefn 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
Sourcefn 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
Sourcefn set_use_underline(&self, use_underline: 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_use_markup_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_use_underline_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".