## GtkToggleToolButton GtkToggleToolButton |

## Functions

GtkToolItem * | gtk_toggle_tool_button_new ()
GtkToolItem * | gtk_toggle_tool_button_new_from_stock ()
void | gtk_toggle_tool_button_set_active ()
gboolean | gtk_toggle_tool_button_get_active ()

## Properties

gboolean | active | Read / Write

## Signals

void | toggled | Run First

## Types and Values

struct | GtkToggleToolButton

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkObject
                ╰── GtkWidget
                    ╰── GtkContainer
                        ╰── GtkBin
                            ╰── GtkToolItem
                                ╰── GtkToolButton
                                    ╰── GtkToggleToolButton
                                        ╰── GtkRadioToolButton

## Implemented Interfaces

GtkToggleToolButton implements AtkImplementorIface, GtkBuildable and GtkActivatable.

## Includes

    #include <gtk/gtk.h>

## Description

## Functions

### gtk_toggle_tool_button_new ()

    GtkToolItem *
    gtk_toggle_tool_button_new (void);

Returns a new GtkToggleToolButton

#### Returns

a newly created GtkToggleToolButton

Since: 2.4

### gtk_toggle_tool_button_new_from_stock ()

    GtkToolItem *
    gtk_toggle_tool_button_new_from_stock (const gchar *stock_id);

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.

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

#### Parameters

stock_id | the name of the stock item |

#### Returns

A new GtkToggleToolButton

Since: 2.4

### gtk_toggle_tool_button_set_active ()

    void
    gtk_toggle_tool_button_set_active (GtkToggleToolButton *button,
                                       gboolean is_active);

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.

#### Parameters

button | a GtkToggleToolButton |
is_active | whether `button` should be active |

Since: 2.4

### gtk_toggle_tool_button_get_active ()

    gboolean
    gtk_toggle_tool_button_get_active (GtkToggleToolButton *button);

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

#### Parameters

button | a GtkToggleToolButton |

#### Returns

`TRUE` if the toggle tool button is pressed in, `FALSE` if not

Since: 2.4

## Types and Values

### struct GtkToggleToolButton

    struct GtkToggleToolButton;

## Property Details

### The `“active”` property

      “active”                   gboolean

If the toggle tool button should be pressed in or not.

Flags: Read / Write

Default value: FALSE

Since: 2.8

## Signal Details

### The `“toggled”` signal

    void
    user_function (GtkToggleToolButton *toggle_tool_button,
                   gpointer             user_data)

Emitted whenever the toggle tool button changes state.

#### Parameters

toggle_tool_button | the object that emitted the signal |
user_data | user data set when the signal handler was connected. |

Flags: Run First