CtkRadioToolButton: CTK+ 3 Reference Manual

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

## Functions

CtkToolItem * | ctk_radio_tool_button_new ()
CtkToolItem * | ctk_radio_tool_button_new_from_stock ()
CtkToolItem * | ctk_radio_tool_button_new_from_widget ()
CtkToolItem * | ctk_radio_tool_button_new_with_stock_from_widget ()
GSList * | ctk_radio_tool_button_get_group ()
void | ctk_radio_tool_button_set_group ()

## Properties

CtkRadioToolButton * | group | Write

## Types and Values

struct | CtkRadioToolButton

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── CtkWidget
                ╰── CtkContainer
                    ╰── CtkBin
                        ╰── CtkToolItem
                            ╰── CtkToolButton
                                ╰── CtkToggleToolButton
                                    ╰── CtkRadioToolButton

## Implemented Interfaces

CtkRadioToolButton implements AtkImplementorIface, CtkBuildable, CtkActivatable and CtkActionable.

## Includes

    #include <ctk/ctk.h>

## Description

A CtkRadioToolButton is a CtkToolItem 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 `ctk_radio_tool_button_new()` to create a new CtkRadioToolButton. Use `ctk_radio_tool_button_new_from_widget()` to create a new CtkRadioToolButton that is part of the same group as an existing CtkRadioToolButton.

### CSS nodes

CtkRadioToolButton has a single CSS node with name toolbutton.

## Functions

### ctk_radio_tool_button_new ()

    CtkToolItem *
    ctk_radio_tool_button_new (GSList *group);

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

#### Parameters

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

#### Returns

The new CtkRadioToolButton

Since: 2.4

### ctk_radio_tool_button_new_from_stock ()

    CtkToolItem *
    ctk_radio_tool_button_new_from_stock (GSList *group,
                                          const gchar *stock_id);

`ctk_radio_tool_button_new_from_stock` has been deprecated since version 3.10 and should not be used in newly-written code.

Use `ctk_radio_tool_button_new()` instead.

Creates a new CtkRadioToolButton, adding it to `group` . The new CtkRadioToolButton 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][element-type CtkRadioButton]
stock_id | the name of a stock item |

#### Returns

The new CtkRadioToolButton

Since: 2.4

### ctk_radio_tool_button_new_from_widget ()

    CtkToolItem *
    ctk_radio_tool_button_new_from_widget (CtkRadioToolButton *group);

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

[constructor]

#### Parameters

group | An existing CtkRadioToolButton, or `NULL`. | [allow-none]

#### Returns

The new CtkRadioToolButton.

[transfer none]

Since: 2.4

### ctk_radio_tool_button_new_with_stock_from_widget ()

    CtkToolItem *
    ctk_radio_tool_button_new_with_stock_from_widget
                                   (CtkRadioToolButton *group,
                                    const gchar *stock_id);

`ctk_radio_tool_button_new_with_stock_from_widget` has been deprecated since version 3.10 and should not be used in newly-written code.

ctk_radio_tool_button_new_from_widget

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

[constructor]

#### Parameters

group | An existing CtkRadioToolButton. | [allow-none]
stock_id | the name of a stock item |

#### Returns

A new CtkRadioToolButton.

[transfer none]

Since: 2.4

### ctk_radio_tool_button_get_group ()

    GSList *
    ctk_radio_tool_button_get_group (CtkRadioToolButton *button);

Returns the radio button group `button` belongs to.

#### Parameters

button | a CtkRadioToolButton |

#### Returns

The group `button` belongs to.

[transfer none][element-type CtkRadioButton]

Since: 2.4

### ctk_radio_tool_button_set_group ()

    void
    ctk_radio_tool_button_set_group (CtkRadioToolButton *button,
                                     GSList *group);

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

#### Parameters

button | a CtkRadioToolButton |
group | an existing radio button group, or `NULL`. | [element-type CtkRadioButton][allow-none]

Since: 2.4

## Types and Values

### struct CtkRadioToolButton

    struct CtkRadioToolButton;

## Property Details

### The `“group”` property

      “group”                    CtkRadioToolButton *

Sets a new group for a radio tool button.

Owner: CtkRadioToolButton

Flags: Write

Since: 2.4

## See Also

CtkToolbar, CtkToolButton