ToggleToolButton

A #GtkToggleToolButton is a #GtkToolItem that contains a toggle button.

Use gtk_toggle_tool_button_new() to create a new GtkToggleToolButton.

CSS nodes

GtkToggleToolButton has a single CSS node with name togglebutton.

Constructors

this
this(GtkToggleToolButton* gtkToggleToolButton, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this(StockID stockId)

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

this
this()

Returns a new #GtkToggleToolButton

this
this(string stockId)

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

Members

Classes

OnToggledDelegateWrapper
class OnToggledDelegateWrapper
Undocumented in source.

Functions

addOnToggled
gulong addOnToggled(void delegate(ToggleToolButton) dlg, ConnectFlags connectFlags)

Emitted whenever the toggle tool button changes state.

getActive
bool getActive()

Queries a #GtkToggleToolButton and returns its current state. Returns %TRUE if the toggle button is pressed in and %FALSE if it is raised.

getStruct
void* getStruct()

the main Gtk struct as a void*

getToggleToolButtonStruct
GtkToggleToolButton* getToggleToolButtonStruct(bool transferOwnership)

Get the main Gtk struct

setActive
void setActive(bool isActive)

Sets the status of the toggle tool button. Set to %TRUE if you want the GtkToggleButton to be “pressed in”, and %FALSE to raise it. This action causes the toggled signal to be emitted.

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

callBackToggled
void callBackToggled(GtkToggleToolButton* toggletoolbuttonStruct, OnToggledDelegateWrapper wrapper)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackToggledDestroy
void callBackToggledDestroy(OnToggledDelegateWrapper wrapper, GClosure* closure)
Undocumented in source. Be warned that the author may not have intended to support it.
getType
GType getType()

Variables

gtkToggleToolButton
GtkToggleToolButton* gtkToggleToolButton;

the main Gtk struct

Inherited Members

From ToolButton

gtkToolButton
GtkToolButton* gtkToolButton;

the main Gtk struct

getToolButtonStruct
GtkToolButton* getToolButtonStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.
__anonymous
mixin ActionableT!(GtkToolButton)
Undocumented in source.
getType
GType getType()
getIconName
string getIconName()

Returns the name of the themed icon for the tool button, see gtk_tool_button_set_icon_name().

getIconWidget
Widget getIconWidget()

Return the widget used as icon widget on @button. See gtk_tool_button_set_icon_widget().

getLabel
string getLabel()

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.

getLabelWidget
Widget getLabelWidget()

Returns the widget used as label on @button. See gtk_tool_button_set_label_widget().

getStockId
string getStockId()

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

getUseUnderline
bool getUseUnderline()

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

setIconName
void setIconName(string iconName)

Sets the icon for the tool button from a named themed icon. See the docs for #GtkIconTheme for more details. The #GtkToolButton:icon-name property only has an effect if not overridden by non-%NULL #GtkToolButton:label-widget, #GtkToolButton:icon-widget and #GtkToolButton:stock-id properties.

setIconWidget
void setIconWidget(Widget iconWidget)

Sets @icon as the widget used as icon on @button. If @icon_widget is %NULL the icon is determined by the #GtkToolButton:stock-id property. If the #GtkToolButton:stock-id property is also %NULL, @button will not have an icon.

setLabel
void setLabel(string label)

Sets @label as the label used for the tool button. The #GtkToolButton:label property only has an effect if not overridden by a non-%NULL #GtkToolButton:label-widget property. If both the #GtkToolButton:label-widget and #GtkToolButton:label properties are %NULL, the label is determined by the #GtkToolButton:stock-id property. If the #GtkToolButton:stock-id property is also %NULL, @button will not have a label.

setLabelWidget
void setLabelWidget(Widget labelWidget)

Sets @label_widget as the widget that will be used as the label for @button. If @label_widget is %NULL the #GtkToolButton:label property is used as label. If #GtkToolButton:label is also %NULL, the label in the stock item determined by the #GtkToolButton:stock-id property is used as label. If #GtkToolButton:stock-id is also %NULL, @button does not have a label.

setStockId
void setStockId(string stockId)

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 #GtkToolButton:label-widget and #GtkToolButton:icon-widget properties.

setUseUnderline
void setUseUnderline(bool useUnderline)

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”.

OnClickedDelegateWrapper
class OnClickedDelegateWrapper
Undocumented in source.
addOnClicked
gulong addOnClicked(void delegate(ToolButton) dlg, ConnectFlags connectFlags)

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

callBackClicked
void callBackClicked(GtkToolButton* toolbuttonStruct, OnClickedDelegateWrapper wrapper)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackClickedDestroy
void callBackClickedDestroy(OnClickedDelegateWrapper wrapper, GClosure* closure)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta