![]() |
![]() |
A Expander allows the user to hide or show its child by clicking on an expander triangle similar to the triangles used in a Gtk::TreeView.
Public Member Functions | ||||
Expander (const Glib::ustring& label, bool mnemonic=false) | ||||
Creates a new Expander with a label. | ||||
Expander () | ||||
Creates a new Expander. | ||||
bool | get_expanded () const | |||
Queries a Gtk::Expander and returns its current state. | ||||
Glib::ustring | get_label () const | |||
Fetches the text from the label of the expander, as set by set_label(). | ||||
const Widget* | get_label_widget () const | |||
Retrieves the label widget for the frame. | ||||
Widget* | get_label_widget () | |||
Retrieves the label widget for the frame. | ||||
int | get_spacing () const | |||
Gets the value set by set_spacing(). | ||||
bool | get_use_markup () const | |||
Returns whether the label's text is interpreted as marked up with the Pango text markup language. | ||||
bool | get_use_underline () const | |||
Returns whether an embedded underline in the expander label indicates a mnemonic. | ||||
const GtkExpander* | gobj () const | |||
Provides access to the underlying C GtkObject. | ||||
GtkExpander* | gobj () | |||
Provides access to the underlying C GtkObject. | ||||
void | set_expanded (bool expanded=true) | |||
Sets the state of the expander. | ||||
void | set_label (const Glib::ustring& label) | |||
Sets the text of the label of the expander to label . | ||||
void | set_label_widget (Widget& label_widget) | |||
Set the label widget for the expander. | ||||
void | set_spacing (int spacing) | |||
Sets the spacing field of expander , which is the number of pixels to place between expander and the child. | ||||
void | set_use_markup (bool use_markup=true) | |||
Sets whether the text of the label contains markup in Pango's text markup language. | ||||
void | set_use_underline (bool use_underline=true) | |||
If true, an underline in the text of the expander label indicates the next character should be used for the mnemonic accelerator key. | ||||
virtual | ~Expander () | |||
Related Functions | ||||
(Note that these are not member functions.) | ||||
Gtk::Expander* | wrap (GtkExpander* object, bool take_copy=false) | |||
|
virtual Gtk::Expander::~Expander | ( | ) | [virtual] |
Gtk::Expander::Expander | ( | const Glib::ustring & | label, | |
bool | mnemonic = false | |||
) | [explicit] |
Creates a new Expander with a label.
Creates a new expander using label as the text of the label. Settin mnemonic to true will allow you to precede characters in the label with an underscore which will make them underlined. If you need a literal underscore character in a label, use '__' (two underscores). The first underlined character represents a keyboard accelerator called a mnemonic. Pressing Alt and that key activates the button.
label | The string for the label describing the Expander. | |
mnemonic | Wether the label may contain underscores to set up accelerators. |
bool Gtk::Expander::get_expanded | ( | ) | const |
Queries a Gtk::Expander and returns its current state.
Returns true
if the child widget is revealed.
See set_expanded().
Glib::ustring Gtk::Expander::get_label | ( | ) | const |
Fetches the text from the label of the expander, as set by set_label().
If the label text has not been set the return value will be 0
. This will be the case if you create an empty button with Gtk::Button::new() to use as a container.
const Widget* Gtk::Expander::get_label_widget | ( | ) | const |
Retrieves the label widget for the frame.
See set_label_widget().
0
if there is none.Widget* Gtk::Expander::get_label_widget | ( | ) |
Retrieves the label widget for the frame.
See set_label_widget().
0
if there is none.int Gtk::Expander::get_spacing | ( | ) | const |
bool Gtk::Expander::get_use_markup | ( | ) | const |
Returns whether the label's text is interpreted as marked up with the Pango text markup language.
See set_use_markup().
true
if the label's text will be parsed for markupbool Gtk::Expander::get_use_underline | ( | ) | const |
Returns whether an embedded underline in the expander label indicates a mnemonic.
See set_use_underline().
true
if an embedded underline in the expander label indicates the mnemonic accelerator keys.const GtkExpander* Gtk::Expander::gobj | ( | ) | const [inline] |
GtkExpander* Gtk::Expander::gobj | ( | ) | [inline] |
void Gtk::Expander::set_expanded | ( | bool | expanded = true |
) |
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. |
void Gtk::Expander::set_label | ( | const Glib::ustring & | label | ) |
Sets the text of the label of the expander to label .
This will also clear any previously set labels.
label | A string. |
void Gtk::Expander::set_label_widget | ( | Widget& | label_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. |
void Gtk::Expander::set_spacing | ( | int | spacing | ) |
Sets the spacing field of expander , which is the number of pixels to place between expander and the child.
spacing | Distance between the expander and child in pixels. |
void Gtk::Expander::set_use_markup | ( | bool | use_markup = true |
) |
Sets whether the text of the label contains markup in Pango's text markup language.
use_markup | true if the label's text should be parsed for markup. |
void Gtk::Expander::set_use_underline | ( | bool | use_underline = true |
) |
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. |
Gtk::Expander* wrap | ( | GtkExpander * | object, | |
bool | take_copy = false | |||
) | [related] |
object | The C instance |
take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |