Main Page Widgets Namespaces Book

# Gtk::RadioToolButton Class Reference
[Widgets]

Inheritance diagram for Gtk::RadioToolButton:

[legend]
List of all members.

## Detailed Description

A toolbar item that contains a radio button.

A Gtk::RadioToolButton is a Gtk::ToolItem 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.

## Public Types

typedef RadioButtonGroup | Group

## Public Member Functions

Group | get_group ()
| Returns the radio button group button belongs to.
const GtkRadioToolButton* | gobj () const
| Provides access to the underlying C GtkObject.
GtkRadioToolButton* | gobj ()
| Provides access to the underlying C GtkObject.
| RadioToolButton (Widget& icon_widget, const Glib::ustring& label=Glib::ustring())
| Creates a new Gtk::RadioToolButton with an image and a new group.
| RadioToolButton (Group& group, const Gtk::StockID& stock_id)
| Creates a new Gtk::RadioToolButton in an existing group.
| RadioToolButton (Group& group, const Glib::ustring& label=Glib::ustring())
| Creates a new Gtk::RadioToolButton in an existing group.
| RadioToolButton ()
| Creates a new Gtk::RadioToolButton and a new group.
void | set_group (Group& group)
| Adds button to group , removing it from the group it belonged to before.
virtual | ~RadioToolButton ()

## Related Functions

(Note that these are not member functions.)
Gtk::RadioToolButton* | wrap (GtkRadioToolButton* object, bool take_copy=false)

## Member Typedef Documentation

typedef RadioButtonGroup Gtk::RadioToolButton::Group

## Constructor & Destructor Documentation

virtual Gtk::RadioToolButton::~RadioToolButton | ( |  | ) | `[virtual]`

Gtk::RadioToolButton::RadioToolButton | ( |  | ) |

Creates a new Gtk::RadioToolButton and a new group.

The RadioToolButton will have an empty label and will reside in an newly created Group. Use get_group() to retrieve this group and pass it to other radio buttons to assign them to this group.

Since gtkmm 2.4:

Gtk::RadioToolButton::RadioToolButton | ( | Group& | group,
|  | const Glib::ustring& | label = `Glib::ustring()`
| ) | `[explicit]`

Creates a new Gtk::RadioToolButton in an existing group.

The RadioToolButton will have the label label and will be put into the Group group.

Parameters:

  | group | The existing group which will be used for this RadioButton.
  | label | The string used to display the label for this RadioToolButton.

Since gtkmm 2.4:

Gtk::RadioToolButton::RadioToolButton | ( | Group& | group,
|  | const Gtk::StockID& | stock_id
| ) |

Creates a new Gtk::RadioToolButton in an existing group.

The RadioToolButton will be created according to the StockID properties and put into the Group group.

Parameters:

  | group | The existing group which will be used for this RadioButton.
  | stock_id | The StockID which determines the look of the RadioToolButton.

Since gtkmm 2.4:

Gtk::RadioToolButton::RadioToolButton | ( | Widget& | icon_widget,
|  | const Glib::ustring& | label = `Glib::ustring()`
| ) | `[explicit]`

Creates a new Gtk::RadioToolButton with an image and a new group.

The RadioToolButton will have the label label and an image widget icon_widget.

Parameters:

  | icon_widget | The widget placed as the RadioToolButton's icon.
  | label | The string used to display the label for this RadioToolButton.

Since gtkmm 2.4:

## Member Function Documentation

Group Gtk::RadioToolButton::get_group | ( |  | ) |

Returns the radio button group button belongs to.

Returns:
  The group button belongs to.

Since gtkmm 2.4:

const GtkRadioToolButton* Gtk::RadioToolButton::gobj | ( |  | ) | const`[inline]`

| Provides access to the underlying C GtkObject. Reimplemented from Gtk::ToggleToolButton.

GtkRadioToolButton* Gtk::RadioToolButton::gobj | ( |  | ) | `[inline]`

| Provides access to the underlying C GtkObject. Reimplemented from Gtk::ToggleToolButton.

void Gtk::RadioToolButton::set_group | ( | Group& | group | ) |

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

Since gtkmm 2.4:

Parameters:

  | group | An existing radio button group.

## Friends And Related Function Documentation

Gtk::RadioToolButton* wrap | ( | GtkRadioToolButton* | object,
|  | bool | take_copy = `false`
| ) | `[related]`

Parameters:

  | object | The C instance
  | take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref.

Returns:
  A C++ instance that wraps this C instance.

The documentation for this class was generated from the following file:

- radiotoolbutton.h