gtkmm 2.24.4

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | Related Functions

# Gtk::ToggleToolButton Class Reference
Widgets

A Gtk::ToolItem containing a toggle button. More...

Inheritance diagram for Gtk::ToggleToolButton:
[legend]
Collaboration diagram for Gtk::ToggleToolButton:
[legend]

List of all members.

## Public Member Functions
virtual | ~ToggleToolButton ()
GtkToggleToolButton* | gobj ()
| Provides access to the underlying C GtkObject.
const GtkToggleToolButton* | gobj () const
| Provides access to the underlying C GtkObject.
| ToggleToolButton ()
| Creates a new ToggleToolButton.
| ToggleToolButton (const Gtk::StockID& stock_id)
| Creates a new ToggleToolButton from a StockID.
| ToggleToolButton (const Glib::ustring& label)
| Creates a new ToggleToolButton with a label.
| ToggleToolButton (Widget& icon_widget, const Glib::ustring& label=Glib::ustring())
| Creates a new ToggleToolButton with an image.
void | set_active (bool is_active=true)
| Sets the status of the toggle tool button.
bool | get_active () const
| Queries a Gtk::ToggleToolButton and returns its current state.
Glib::SignalProxy0< void > | signal_toggled ()
Glib::PropertyProxy< bool > | property_active ()
| If the toggle button should be pressed in or not.
Glib::PropertyProxy_ReadOnly < bool > | property_active () const
| If the toggle button should be pressed in or not.
## Protected Member Functions
virtual void | on_toggled ()
## Related Functions
(Note that these are not member functions.)
Gtk::ToggleToolButton* | wrap (GtkToggleToolButton* object, bool take_copy=false)
| A Glib::wrap() method for this object.

## Detailed Description

A Gtk::ToolItem containing a toggle button.

A ToggleToolButton is a Gtk::ToolItem that contains a toggle button.

A ToggleToolButton widget looks like this:

## Constructor & Destructor Documentation

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

Gtk::ToggleToolButton::ToggleToolButton | ( |  | ) |

Creates a new ToggleToolButton.

Gtk::ToggleToolButton::ToggleToolButton | ( | const Gtk::StockID& | stock_id | ) | `[explicit]`

Creates a new ToggleToolButton from a StockID.

The ToggleToolButton will be created according to the stock_id properties.

Parameters:

  stock_id | The StockID which determines the look of the ToggleToolButton.

Gtk::ToggleToolButton::ToggleToolButton | ( | const Glib::ustring & | label | ) | `[explicit]`

Creates a new ToggleToolButton with a label.

The ToggleToolButton will have the label label.

Parameters:

  label | The string used to display the label for this ToggleToolButton.

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

Creates a new ToggleToolButton with an image.

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

Parameters:

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

## Member Function Documentation

bool Gtk::ToggleToolButton::get_active | ( |  | ) | const

Queries a Gtk::ToggleToolButton and returns its current state.

Returns `true` if the toggle button is pressed in and `false` if it is raised.

Since gtkmm 2.4:

Returns:
  `true` if the toggle tool button is pressed in, `false` if not.

GtkToggleToolButton* Gtk::ToggleToolButton::gobj | ( |  | ) | `[inline]`

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::ToolButton.

Reimplemented in Gtk::RadioToolButton.

const GtkToggleToolButton* Gtk::ToggleToolButton::gobj | ( |  | ) | const`[inline]`

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::ToolButton.

Reimplemented in Gtk::RadioToolButton.

virtual void Gtk::ToggleToolButton::on_toggled | ( |  | ) | `[protected, virtual]`

Glib::PropertyProxy<bool> Gtk::ToggleToolButton::property_active | ( |  | ) |

If the toggle button should be pressed in or not.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<bool> Gtk::ToggleToolButton::property_active | ( |  | ) | const

If the toggle button should be pressed in or not.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

void Gtk::ToggleToolButton::set_active | ( | bool | is_active = `true` | ) |

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.

Since gtkmm 2.4:

Parameters:

  is_active | Whether button should be active.

Glib::SignalProxy0< void > Gtk::ToggleToolButton::signal_toggled | ( |  | ) |

Prototype:
  `void on_my_toggled()`

## Friends And Related Function Documentation

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

A Glib::wrap() method for this object.

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:

- gtkmm/toggletoolbutton.h