11.123Class GtkToolButton

A GtkToolItem subclass that displays buttons

Class GtkToolButton( icon_widget, label )
icon_widget a GtkMisc widget that will be used as icon widget, or NULL.
label a string that will be used as label, or NULL.

GtkToolButtons are GtkToolItems containing buttons.

The label of a GtkToolButton is determined by the properties "label-widget", "label", and "stock-id". If "label-widget" is non-NULL, then that widget is used as the label. Otherwise, if "label" is non-NULL, that string is used as the label. Otherwise, if "stock-id" is non-NULL, the label is determined by the stock item. Otherwise, the button does not have a label.

The icon of a GtkToolButton is determined by the properties "icon-widget" and "stock-id". If "icon-widget" is non-NULL, then that widget is used as the icon. Otherwise, if "stock-id" is non-NULL, the icon is determined by the stock item. Otherwise, the button does not have a icon.

Methods
get_icon_nameReturns the name of the themed icon for the tool button.
get_icon_widgetReturn the widget used as icon widget on button.
get_labelReturns the label used by the tool button, or NULL if the tool button doesn't have a label or uses a the label from a stock item.
get_label_widgetReturns the widget used as label on button.
get_stock_idReturns the name of the stock item.
get_use_underlineReturns whether underscores in the label property are used as mnemonics on menu items on the overflow menu.
new_from_stockCreates a new GtkToolButton containing the image and text from a stock item.
set_icon_nameSets the icon for the tool button from a named themed icon.
set_icon_widgetSets icon as the widget used as icon on button.
set_labelSets label as the label used for the tool button.
set_label_widgetSets label_widget as the widget that will be used as the label for button.
set_stock_idSets the name of the stock item.
set_use_underlineIf set, an underline in the label property indicates that the next character should be used for the mnemonic accelerator key in the overflow menu
signal_clickedThis signal is emitted when the tool button is clicked with the mouse or activated with the keyboard.

Methods

get_icon_name

Returns the name of the themed icon for the tool button.

GtkToolButton.get_icon_name()
Returnthe icon name or NULL if the tool button has no themed icon

get_icon_widget

Return the widget used as icon widget on button.

GtkToolButton.get_icon_widget()
ReturnThe widget used as icon on button, or NULL.

get_label

Returns the label used by the tool button, or NULL if the tool button doesn't have a label or uses a the label from a stock item.

GtkToolButton.get_label()
ReturnThe label, or NULL

get_label_widget

Returns the widget used as label on button.

GtkToolButton.get_label_widget()
ReturnThe widget used as label on button, or NULL.

get_stock_id

Returns the name of the stock item.

GtkToolButton.get_stock_id()
Returnthe name of the stock item for button.

get_use_underline

Returns whether underscores in the label property are used as mnemonics on menu items on the overflow menu.

GtkToolButton.get_use_underline()
ReturnTRUE if underscores in the label property are used as mnemonics on menu items on the overflow menu.

new_from_stock

Creates a new GtkToolButton containing the image and text from a stock item.

GtkToolButton.new_from_stock( stock_id )
stock_id the name of the stock item
ReturnA new GtkToolButton

Some stock ids have preprocessor macros like GTK_STOCK_OK and GTK_STOCK_APPLY.

set_icon_name

Sets the icon for the tool button from a named themed icon.

GtkToolButton.set_icon_name( the )
the name of the themed icon, or nil.

The "icon_name" property only has an effect if not overridden by non-NULL "label", "icon_widget" and "stock_id" properties.

set_icon_widget

Sets icon as the widget used as icon on button.

GtkToolButton.set_icon_widget( icon_widget )
icon_widget the widget used as icon, or NULL.

If icon_widget is NULL the icon is determined by the "stock_id" property. If the "stock_id" property is also NULL, button will not have an icon.

set_label

Sets label as the label used for the tool button.

GtkToolButton.set_label( label )
label a string that will be used as label, or NULL.

The "label" property only has an effect if not overridden by a non-NULL "label_widget" property. If both the "label_widget" and "label" properties are NULL, the label is determined by the "stock_id" property. If the "stock_id" property is also NULL, button will not have a label.

set_label_widget

Sets label_widget as the widget that will be used as the label for button.

GtkToolButton.set_label_widget( label_widget )
label_widget the widget used as label, or NULL.

If label_widget is NULL the "label" property is used as label. If "label" is also NULL, the label in the stock item determined by the "stock_id" property is used as label. If "stock_id" is also NULL, button does not have a label.

set_stock_id

Sets the name of the stock item.

GtkToolButton.set_stock_id( a )
a name of a stock item, or NULL.

The stock_id property only has an effect if not overridden by non-NULL "label" and "icon_widget" properties.

set_use_underline

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

GtkToolButton.set_use_underline( use_underline )
use_underline whether the button label has the form "_Open"

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.

signal_clicked

This signal is emitted when the tool button is clicked with the mouse or activated with the keyboard.

GtkToolButton.signal_clicked()
Made with http://www.falconpl.org