GtkRadioToolButton: GTK+ 2 Reference Manual

## GtkRadioToolButton GtkRadioToolButton — A toolbar item that contains a radio button |

## Functions

GtkToolItem * | gtk_radio_tool_button_new ()
GtkToolItem * | gtk_radio_tool_button_new_from_stock ()
GtkToolItem * | gtk_radio_tool_button_new_from_widget ()
GtkToolItem * | gtk_radio_tool_button_new_with_stock_from_widget ()
GSList * | gtk_radio_tool_button_get_group ()
void | gtk_radio_tool_button_set_group ()

## Properties

GtkRadioToolButton * | group | Write

## Types and Values

struct | GtkRadioToolButton

## Object Hierarchy

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

## Implemented Interfaces

GtkRadioToolButton implements AtkImplementorIface, GtkBuildable and GtkActivatable.

## Includes

    #include <gtk/gtk.h>

## Description

A GtkRadioToolButton is a GtkToolItem that contains a radio button, that is, a button that is part of a group of toggle buttons where only one button can be active at a time.

Use `gtk_radio_tool_button_new()` to create a new GtkRadioToolButton. use `gtk_radio_tool_button_new_from_widget()` to create a new GtkRadioToolButton that is part of the same group as an existing GtkRadioToolButton. Use `gtk_radio_tool_button_new_from_stock()` or `gtk_radio_tool_button_new_from_widget_with_stock()` to create a new GtkRAdioToolButton containing a stock item.

## Functions

### gtk_radio_tool_button_new ()

    GtkToolItem *
    gtk_radio_tool_button_new (GSList *group);

Creates a new GtkRadioToolButton, adding it to `group` .

#### Parameters

group | An existing radio button group, or `NULL` if you are creating a new group. | [allow-none]

#### Returns

The new GtkRadioToolButton

Since: 2.4

### gtk_radio_tool_button_new_from_stock ()

    GtkToolItem *
    gtk_radio_tool_button_new_from_stock (GSList *group,
                                          const gchar *stock_id);

Creates a new GtkRadioToolButton, adding it to `group` . The new GtkRadioToolButton will contain an icon and label from the stock item indicated by `stock_id` .

#### Parameters

group | an existing radio button group, or `NULL` if you are creating a new group. | [allow-none]
stock_id | the name of a stock item |

#### Returns

The new GtkRadioToolItem

Since: 2.4

### gtk_radio_tool_button_new_from_widget ()

    GtkToolItem *
    gtk_radio_tool_button_new_from_widget (GtkRadioToolButton *group);

Creates a new GtkRadioToolButton adding it to the same group as `gruup`

#### Parameters

group | An existing GtkRadioToolButton |

#### Returns

The new GtkRadioToolButton.

[transfer none]

Since: 2.4

### gtk_radio_tool_button_new_with_stock_from_widget ()

    GtkToolItem *
    gtk_radio_tool_button_new_with_stock_from_widget
                                   (GtkRadioToolButton *group,
                                    const gchar *stock_id);

Creates a new GtkRadioToolButton adding it to the same group as `group` . The new GtkRadioToolButton will contain an icon and label from the stock item indicated by `stock_id` .

#### Parameters

group | An existing GtkRadioToolButton. |
stock_id | the name of a stock item |

#### Returns

A new GtkRadioToolButton.

[transfer none]

Since: 2.4

### gtk_radio_tool_button_get_group ()

    GSList *
    gtk_radio_tool_button_get_group (GtkRadioToolButton *button);

Returns the radio button group `button` belongs to.

#### Parameters

button | a GtkRadioToolButton |

#### Returns

The group `button` belongs to.

[transfer none]

Since: 2.4

### gtk_radio_tool_button_set_group ()

    void
    gtk_radio_tool_button_set_group (GtkRadioToolButton *button,
                                     GSList *group);

Adds `button` to `group` , removing it from the group it belonged to before.

#### Parameters

button | a GtkRadioToolButton |
group | an existing radio button group |

Since: 2.4

## Types and Values

### struct GtkRadioToolButton

    struct GtkRadioToolButton;

The GtkRadioToolButton contains only private data and should only be accessed through the functions described below.

## Property Details

### The `“group”` property

      “group”                    GtkRadioToolButton *

Sets a new group for a radio tool button.

Flags: Write

Since: 2.4

## See Also

GtkToolbar | The toolbar widget
GtkToolButton | An ancestor class of GtkRadioToolButton. The properties "label_widget", "label", "icon_widget", and "stock_id" on GtkToolButton determine the label and icon used on a GtkRadioToolButton.
GtkSeparatorToolItem | A subclass of GtkToolItem that separates groups of items on a toolbar. It is usually a good idea to put a separator before and after a group of GtkRadioToolButtons on a GtkToolbar.