W Wrapl, The Programming Language

Libraries:Gtk:Gtk:ToolButton

Types

T

Inherits from:

Ts are GtkToolItems containing buttons.

Use gtk_tool_button_new() to create a new T. Use gtk_tool_button_new_with_stock() to create a T containing a stock item.

The label of a T 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 T 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.



Constants

Nil : T

Functions

GetType() : Gtk.GObject.Type.T



New(icon_widget @ Gtk.Gtk.Widget.T, label @ Std.String.T) : Gtk.Gtk.ToolButton.T

Creates a new T using icon_widget as icon and label as label.

icon_widget a Gtk.Gtk.Misc.T widget that will be used as icon widget, or NULL. [allow-none]
label a string that will be used as label, or NULL. [allow-none]
Returns A new T


NewFromStock(stock_id @ Std.String.T) : Gtk.Gtk.ToolButton.T

Creates a new T containing the image and text from a stock item. Some stock ids have preprocessor macros like GTK_STOCK_OK and GTK_STOCK_APPLY.

It is an error if stock_id is not a name of a stock item.

stock_id the name of the stock item
Returns A new T


Methods

:GetIconName(self @ T) : Std.String.T

Returns the name of the themed icon for the tool button, see SetIconName.

button a T
Returns the icon name or NULL if the tool button has no themed icon


:GetIconWidget(self @ T) : Gtk.Gtk.Widget.T

Return the widget used as icon widget on button. See SetIconWidget.

button a T
Returns The widget used as icon on button, or NULL. [transfer none]


:GetLabel(self @ T) : Std.String.T

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. The returned string is owned by GTK+, and must not be modified or freed.

button a T
Returns The label, or NULL


:GetLabelWidget(self @ T) : Gtk.Gtk.Widget.T

Returns the widget used as label on button. See SetLabelWidget.

button a T
Returns The widget used as label on button, or NULL. [transfer none]


:GetStockId(self @ T) : Std.String.T

Returns the name of the stock item. See SetStockId. The returned string is owned by GTK+ and must not be freed or modifed.

button a T
Returns the name of the stock item for button.


:GetUseUnderline(self @ T) : Std.Symbol.T

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

button a T
Returns TRUE if underscores in the label property are used as mnemonics on menu items on the overflow menu.


:SetIconName(self @ T, icon_name @ Std.String.T) : Std.Object.T

Sets the icon for the tool button from a named themed icon. See the docs for Gtk.Gtk.IconTheme.T for more details. The "icon_name" property only has an effect if not overridden by non-NULL "label", "icon_widget" and "stock_id" properties.

button a T
icon_name the name of the themed icon. [allow-none]


:SetIconWidget(self @ T, icon_widget @ Gtk.Gtk.Widget.T) : Std.Object.T

Sets icon as the widget used as icon on button. 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.

button a T
icon_widget the widget used as icon, or NULL. [allow-none]


:SetLabel(self @ T, label @ Std.String.T) : Std.Object.T

Sets label as the label used for the tool button. 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.

button a T
label a string that will be used as label, or NULL. [allow-none]


:SetLabelWidget(self @ T, label_widget @ Gtk.Gtk.Widget.T) : Std.Object.T

Sets label_widget as the widget that will be used as the label for button. 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.

button a T
label_widget the widget used as label, or NULL. [allow-none]


:SetStockId(self @ T, stock_id @ Std.String.T) : Std.Object.T

Sets the name of the stock item. See gtk_tool_button_new_from_stock(). The stock_id property only has an effect if not overridden by non-NULL "label" and "icon_widget" properties.

button a T
stock_id a name of a stock item, or NULL. [allow-none]


:SetUseUnderline(self @ T, use_underline @ Std.Symbol.T) : Std.Object.T

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.

button a T
use_underline whether the button label has the form "_Open"