Xfce Foundation Classes
Main Page | Index | Namespace List | Alphabetical List | Class List | File List

# Xfc::Gtk::CellRendererToggle Class Reference

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

`#include <xfc/gtk/cellrenderertoggle.hh>`

Inheritance diagram for Xfc::Gtk::CellRendererToggle:

List of all members.

## Property Prototypes

- const ActivePropertyType active_property
    The toggle state of the button (see property_active()).
- const ActivatablePropertyType activatable_property
    The toggle button can be activated (see property_activatable()).
- const RadioPropertyType radio_property
    Draw the toggle button as a radio button (see property_radio()).
- const InconsistentPropertyType inconsistent_property
    The inconsistent state of the button (see property_inconsistent()).

## Signal Prototypes

- const ToggledSignalType toggled_signal
    Toggled signal (see signal_toggled()).

## 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.
- 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 property_active ()
    The toggle state of the button (bool : Read / Write).
- const ActivatablePropertyProxy property_activatable ()
    The toggle button can be activated (bool : Read / Write).
- const RadioPropertyProxy property_radio ()
    Draw the toggle button as a radio button (bool : Read / Write).
- const InconsistentPropertyProxy property_inconsistent ()
    The inconsistent state of the button (bool : Read / Write).

Signal Proxies

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

## Protected Member Functions

Constructors

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

## Detailed Description

A GtkCellRendererToggle C++ wrapper class.

## Constructor & Destructor Documentation

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

  | Construct a new CellRendererToggle from an existing GtkCellRendererToggle. Parameters:
  | cell | A pointer to a GtkCellRendererToggle.
  | owns_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).

Xfc::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 Xfc::Gtk::CellRendererToggle::set_active | ( | bool | setting | ) |

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

void Xfc::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).

## Member Data Documentation

const ToggledSignalType Xfc::Gtk::CellRendererToggle::toggled_signal`[static, protected]`

| Toggled signal (see signal_toggled()). Calls a slot with the signature:
                 void function(const String& path);
                 // path: A widget-dependent string representation of the event location.

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

- cellrenderertoggle.hh

Xfce Foundation Classes

Copyright © 2004-2005 The XFC Development Team | XFC 4.3