gtkmm: Gtk::CheckButton Class Reference

gtkmm 3.4.0

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

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

Public Member Functions | Protected Member Functions | Related Functions
Gtk::CheckButton Class Reference
Widgets

Create widgets with a discrete toggle button. More...

Inheritance diagram for Gtk::CheckButton:
[legend]

List of all members.

## Public Member Functions
virtual | ~CheckButton ()
GtkCheckButton* | gobj ()
| Provides access to the underlying C GtkObject.
const GtkCheckButton* | gobj () const
| Provides access to the underlying C GtkObject.
| CheckButton ()
| Create an empty check button.
| CheckButton (const Glib::ustring& label, bool mnemonic=false)
| Create a check button with a label.
## Protected Member Functions
virtual void | draw_indicator_vfunc (const ::Cairo::RefPtr< ::Cairo::Context >& cr)
| Emited on button redraw to update indicator.
## Related Functions
(Note that these are not member functions.)
Gtk::CheckButton* | wrap (GtkCheckButton* object, bool take_copy=false)
| A Glib::wrap() method for this object.

## Detailed Description

Create widgets with a discrete toggle button.

A Gtk::CheckButton places a discrete Gtk::ToggleButton next to a widget, (usually a Gtk::Label). See Gtk::ToggleButton widgets for more information about toggle/check buttons. The important signal, signal_toggled() is also inherited from Gtk::ToggleButton.

The CheckButton widget looks like this:

## Constructor & Destructor Documentation

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

Gtk::CheckButton::CheckButton | ( |  | ) |

Create an empty check button.

With an empty button, you can Gtk::Button::add() a widget such as a Gtk::Image or Gtk::Box.

If you just wish to add a Gtk::Label, you may want to use the Gtk::CheckButton(const Glib::ustring& label) constructor directly instead.

Gtk::CheckButton::CheckButton | ( | const Glib::ustring & | label,
|  | bool | mnemonic = `false`
| ) |  | `[explicit]`

Create a check button with a label.

You won't be able to add a widget to this button since it already contains a Gtk::Label

## Member Function Documentation

virtual void Gtk::CheckButton::draw_indicator_vfunc | ( | const ::Cairo::RefPtr< ::Cairo::Context > & | cr | ) | `[protected, virtual]`

Emited on button redraw to update indicator.

Triggered when the button is redrawn (e.g.after being toggled) Overload this signal if you want to implement your own check button look. Otherwise, you most likely don't care about it. The GdkRectangle specifies the area of the widget which will get redrawn.

GtkCheckButton* Gtk::CheckButton::gobj | ( |  | ) | `[inline]`

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::ToggleButton.

Reimplemented in Gtk::RadioButton.

const GtkCheckButton* Gtk::CheckButton::gobj | ( |  | ) | const`[inline]`

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::ToggleButton.

Reimplemented in Gtk::RadioButton.

## Friends And Related Function Documentation

Gtk::CheckButton* wrap | ( | GtkCheckButton * | 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/checkbutton.h