pub trait ExpanderExt: 'static {
Show 26 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(&self, label_widget: Option<&impl IsA<Widget>>); 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

Trait containing all Expander methods.

Implementors

Expander

Required Methods

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.

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

Retrieves the label widget for the frame. See set_label_widget().

Returns

the label widget, or None if there is none

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

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

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

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

Sets the text of the label of the expander to label.

This will also clear any previously set labels.

label

a string

Sets whether the label widget should fill all available horizontal space allocated to self.

Note that this function has no effect since 3.20.

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

Sets whether the expander will resize the toplevel widget containing the expander upon resizing and collpasing.

resize_toplevel

whether to resize the toplevel

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

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

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

Implementors