![]() |
![]() |
A ToolButton is are Gtk::ToolItem containing a button.
Public Member Functions | ||||
const Widget* | get_icon_widget () const | |||
Return the widget used as icon widget on button . | ||||
Widget* | get_icon_widget () | |||
Return the widget used as icon widget on button . | ||||
Glib::ustring | get_label () const | |||
Returns the label used by the tool button, or 0 if the tool button doesn't have a label. | ||||
const Widget* | get_label_widget () const | |||
Returns the widget used as label on button . | ||||
Widget* | get_label_widget () | |||
Returns the widget used as label on button . | ||||
Glib::ustring | get_stock_id () const | |||
Returns the name of the stock item. | ||||
bool | get_use_underline () const | |||
Returns whether underscores in the label property are used as mnemonics on menu items on the overflow menu. | ||||
const GtkToolButton* | gobj () const | |||
Provides access to the underlying C GtkObject. | ||||
GtkToolButton* | gobj () | |||
Provides access to the underlying C GtkObject. | ||||
void | set_icon_widget (Widget& icon_widget) | |||
Sets icon as the widget used as icon on button . | ||||
void | set_label (const Glib::ustring& label) | |||
Sets label as the label used for the tool button. | ||||
void | set_label_widget (Widget& label_widget) | |||
Sets label_widget as the widget that will be used as the label for button . | ||||
void | set_stock_id (const Gtk::StockID& stock_id) | |||
Sets the name of the stock item. | ||||
void | set_use_underline (bool use_underline=true) | |||
If set, an underline in the label property indicates that the next character should be used for the mnemonic accelerator key in the overflow menu. | ||||
Glib::SignalProxy0<void> | signal_clicked () | |||
This signal is emitted when the tool button is clicked with the mouse or activated with the keyboard. | ||||
ToolButton (Widget& icon_widget, const Glib::ustring& label=Glib::ustring()) | ||||
Creates a new ToolButton with an image. | ||||
ToolButton (const Glib::ustring& label) | ||||
Creates a new ToolButton with a label. | ||||
ToolButton (const Gtk::StockID& stock_id) | ||||
Creates a new ToolButton from a StockID. | ||||
ToolButton () | ||||
Creates a new ToolButton. | ||||
virtual | ~ToolButton () | |||
Related Functions | ||||
(Note that these are not member functions.) | ||||
Gtk::ToolButton* | wrap (GtkToolButton* object, bool take_copy=false) | |||
|
virtual Gtk::ToolButton::~ToolButton | ( | ) | [virtual] |
Gtk::ToolButton::ToolButton | ( | ) |
Creates a new ToolButton.
Gtk::ToolButton::ToolButton | ( | const Gtk::StockID& | stock_id | ) | [explicit] |
Creates a new ToolButton from a StockID.
The ToolButton will be created according to the stock_id properties.
stock_id | The StockID which determines the look of the ToolButton. |
Gtk::ToolButton::ToolButton | ( | const Glib::ustring & | label | ) | [explicit] |
Creates a new ToolButton with a label.
The ToolButton will have the label label.
label | The string used to display the label for this ToolButton. |
Gtk::ToolButton::ToolButton | ( | Widget& | icon_widget, | |
const Glib::ustring & | label = Glib::ustring() | |||
) | [explicit] |
Creates a new ToolButton with an image.
The ToolButton will have the label label and an image widget icon_widget.
icon_widget | The widget placed as the ToolButton's icon. | |
label | The string used to display the label for this ToolButton. |
const Widget* Gtk::ToolButton::get_icon_widget | ( | ) | const |
Return the widget used as icon widget on button .
See set_icon_widget().
0
.Widget* Gtk::ToolButton::get_icon_widget | ( | ) |
Return the widget used as icon widget on button .
See set_icon_widget().
0
.Glib::ustring Gtk::ToolButton::get_label | ( | ) | const |
Returns the label used by the tool button, or 0
if the tool button doesn't have a label.
or uses a the label from a stock item. The returned string is owned by GTK+, and must not be modified or freed.
0
const Widget* Gtk::ToolButton::get_label_widget | ( | ) | const |
Returns the widget used as label on button .
See set_label_widget().
0
.Widget* Gtk::ToolButton::get_label_widget | ( | ) |
Returns the widget used as label on button .
See set_label_widget().
0
.Glib::ustring Gtk::ToolButton::get_stock_id | ( | ) | const |
Returns the name of the stock item.
See set_stock_id(). The returned string is owned by GTK+ and must not be freed or modifed.
bool Gtk::ToolButton::get_use_underline | ( | ) | const |
Returns whether underscores in the label property are used as mnemonics on menu items on the overflow menu.
See set_use_underline().
true
if underscores in the label property are used as mnemonics on menu items on the overflow menu.const GtkToolButton* Gtk::ToolButton::gobj | ( | ) | const [inline] |
Provides access to the underlying C GtkObject.
Reimplemented from Gtk::ToolItem.
Reimplemented in Gtk::MenuToolButton, Gtk::RadioToolButton, and Gtk::ToggleToolButton.
GtkToolButton* Gtk::ToolButton::gobj | ( | ) | [inline] |
Provides access to the underlying C GtkObject.
Reimplemented from Gtk::ToolItem.
Reimplemented in Gtk::MenuToolButton, Gtk::RadioToolButton, and Gtk::ToggleToolButton.
void Gtk::ToolButton::set_icon_widget | ( | Widget& | icon_widget | ) |
Sets icon as the widget used as icon on button .
If icon_widget is 0
the icon is determined by the "stock_id" property. If the "stock_id" property is also 0
, button will not have an icon.
icon_widget | The widget used as icon, or 0 . |
void Gtk::ToolButton::set_label | ( | const Glib::ustring & | label | ) |
Sets label as the label used for the tool button.
The "label" property only has an effect if not overridden by a non-0
"label_widget" property. If both the "label_widget" and "label" properties are 0
, the label is determined by the "stock_id" property. If the "stock_id" property is also 0
, button will not have a label.
label | A string that will be used as label, or 0 . |
void Gtk::ToolButton::set_label_widget | ( | Widget& | label_widget | ) |
Sets label_widget as the widget that will be used as the label for button .
If label_widget is 0
the "label" property is used as label. If "label" is also 0
, the label in the stock item determined by the "stock_id" property is used as label. If "stock_id" is also 0
, button does not have a label.
label_widget | The widget used as label, or 0 . |
void Gtk::ToolButton::set_stock_id | ( | const Gtk::StockID& | stock_id | ) |
Sets the name of the stock item.
See new_from_stock(). The stock_id property only has an effect if not overridden by non-0
"label" and "icon_widget" properties.
stock_id | A name of a stock item, or 0 . |
void Gtk::ToolButton::set_use_underline | ( | bool | use_underline = true |
) |
If set, an underline in the label property indicates that the next character should be used for the mnemonic accelerator key in the overflow menu.
For example, if the label property is "_Open" and use_underline is true
, the label on the tool button will be "Open" and the item on the overflow menu will have an underlined 'O'.
Labels shown on tool buttons never have mnemonics on them; this property only affects the menu item on the overflow menu.
use_underline | Whether the button label has the form "_Open". |
Glib::SignalProxy0< void > Gtk::ToolButton::signal_clicked | ( | ) |
This signal is emitted when the tool button is clicked with the mouse or activated with the keyboard.
void clicked()
Gtk::ToolButton* wrap | ( | GtkToolButton * | 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. |