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

# Xfc::Gtk::ToggleToolButton Class Reference

A GtkToggleToolButton C++ wrapper class. More...

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

Inheritance diagram for Xfc::Gtk::ToggleToolButton:

List of all members.

## Signal Prototypes

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

## Public Member Functions

Constructors

- ToggleToolButton ()
    Constructs an empty toggle tool button.
- ToggleToolButton (const StockId &stock_id)
    Constructs a new toggle tool button containing the image and text from a stock item.
- virtual ~ToggleToolButton ()
    Destructor.

Accessors

- GtkToggleToolButton * gtk_toggle_tool_button () const
    Get a pointer to the GtkToggleToolButton structure.
- operator GtkToggleToolButton * () const
    Conversion operator; safely converts an ToggleToolButton to a GtkToggleToolButton pointer.
- bool get_active () const
    Queries a toggle tool button and returns its current state.

Methods

- void set_active (bool is_active)
    Sets the status of the toggle tool button.

Signal Proxies

- const ToggledSignalProxy signal_toggled ()
    Connect to the toggled_signal; emitted whenever the toggle tool button changes state.

## Protected Member Functions

Constructors

- ToggleToolButton (GtkToggleToolButton *button, bool owns_reference=false)
    Construct a new ToggleToolButton from an existing GtkToggleToolButton.

## Detailed Description

A GtkToggleToolButton C++ wrapper class.

A ToggleToolButton is a ToolItem that contains a toggle button.

See also: the ToolItems HOWTO.

## Constructor & Destructor Documentation

Xfc::Gtk::ToggleToolButton::ToggleToolButton | ( | GtkToggleToolButton * | button,
|  | bool | owns_reference = `false`
| ) | `[explicit, protected]`

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

Xfc::Gtk::ToggleToolButton::ToggleToolButton | ( | const StockId & | stock_id | ) |

  | Constructs a new toggle tool button containing the image and text from a stock item. Parameters:
  | stock_id | The ID of the stock item (see set_stock_id()).
It is an error if stock_id is not a name of a stock item.

## Member Function Documentation

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

| Queries a toggle tool button and returns its current state. Returns: true if the toggle button is pressed in and false if it is raised.

void Xfc::Gtk::ToggleToolButton::set_active | ( | bool | is_active | ) |

  | Sets the status of the toggle tool button. Parameters:
  | is_active | Whether the button should be active or not.
Set to true if you want the toggle tool button to be 'pressed in', and false to raise it. This action causes the toggled signal to be emitted.

## Member Data Documentation

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

| Toggled signal (see signal_toggled()). Calls a slot with the signature:
                 void function();

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

- toggletoolbutton.hh

Xfce Foundation Classes

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