Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# Inti::Gtk::CellRendererToggle Class Reference

A GtkCellRendererToggle C++ wrapper class. More...

`#include <inti/gtk/cellrenderer.h>`

Inheritance diagram for Inti::Gtk::CellRendererToggle:

List of all members.

## Public Member Functions

Constructors

- CellRendererToggle ()
    Construct a new CellRendererToggle.
- virtual ~CellRendererToggle ()
    Destructor.

Accessors

- GtkCellRendererToggle * gtk_cell_renderer_toggle () const
    Get a pointer to the GtkCellRendererToggle structure.
- GtkCellRendererToggleClass * gtk_cell_renderer_toggle_class () const
    Get a pointer to the GtkCellRendererToggleClass structure.
- operator GtkCellRendererToggle * () const
    Conversion operator; safely converts a CellRendererToggle to a GtkCellRendererToggle pointer.
- bool get_active () const
    Returns true if the cell renderer is active (see set_active()).
- bool get_radio () const
    Returns true if we're rendering radio toggles rather than checkboxes.

Methods

- void set_active (bool setting)
    Activates or deactivates a cell renderer.
- void set_radio (bool radio)
    If radio is true, the cell renderer renders a radio toggle; if false it renders a check toggle.

Property Proxies

- const ActivePropertyProxy prop_active ()
    The toggle state of the button (bool : Read / Write).
- const ActivatablePropertyProxy prop_activatable ()
    The toggle button can be activated (bool : Read / Write).
- const RadioPropertyProxy prop_radio ()
    Draw the toggle button as a radio button (bool : Read / Write).
- const InconsistentPropertyProxy prop_inconsistent ()
    The inconsistent state of the button (bool : Read / Write).

Signal Proxies

- const ToggledSignalProxy sig_toggled ()
    Connect to the toggled_signal; emitted when the state of the CellRenderer is changed.

## Protected Member Functions

Constructors

- CellRendererToggle (GtkCellRendererToggle *cell, bool reference=false)
    Construct a new CellRendererToggle from an existing GtkCellRendererToggle.

Signal Handlers

- virtual void on_toggled (const String &path)
    Called when the state of the CellRenderer is changed.

## Detailed Description

A GtkCellRendererToggle C++ wrapper class.

## Constructor & Destructor Documentation

Inti::Gtk::CellRendererToggle::CellRendererToggle | ( | GtkCellRendererToggle * | cell,
|  | bool | reference = false
| ) | `[explicit, protected]`

  | Construct a new CellRendererToggle from an existing GtkCellRendererToggle. Parameters:
  cell | A pointer to a GtkCellRendererToggle.
  reference | Set false if the initial reference count is floating, set true if it's not.
The cell can be a newly created GtkCellRendererToggle or an existing GtkCellRendererToggle. (see G::Object::Object).

Inti::Gtk::CellRendererToggle::CellRendererToggle | ( |  | ) |

| Construct a new CellRendererToggle. Adjust rendering parameters using object properties. Also, with TreeViewColumn, you can bind a property to a value in a TreeModel. For example, you can bind the "active" property on the cell renderer to a bool value in the model, thus causing the check button to reflect the state of the model.

## Member Function Documentation

void Inti::Gtk::CellRendererToggle::set_active | ( | bool | setting | ) |

  | Activates or deactivates a cell renderer. Parameters:
  setting | The value to set.

void Inti::Gtk::CellRendererToggle::set_radio | ( | bool | radio | ) |

  | If radio is true, the cell renderer renders a radio toggle; if false it renders a check toggle. Parameters:
  radio | true to make the toggle look like a radio button.
This can be set globally for the cell renderer, or changed just before rendering each cell in the model (for TreeView, you set up a per-row setting using TreeViewColumn to associate model columns with cell renderer properties).

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

- cellrenderer.h

Main Page - Footer