index
gtk-- homepage



Description:
Gtk_ToggleButton

#include <gtk--/togglebutton.h>
Base classes: Gtk_Button
Derived by: Gtk_CheckButton



Properties:

NameTypeGetSetDescription
active guint:1 get_active() set_active() Whether the button is toggled on (e.g. active) or off
draw_indicator guint:1 get_mode() set_mode() Whether the button or only its parent itself will be redrawn when toggled. If set to true, the button will be redrawn, otherwise only the parent will be.


Public member index:


Gtk_ToggleButton();
Create an empty toggle button.

Gtk_ToggleButton(const string &label);
Create a check button with a label.

Gtk_ToggleButton(GtkToggleButton *castitem);
void set_mode(bool draw_indicator);
Set whether the indicator will be drawn.

bool get_mode()const;
Returns whether the indicator will be drawn.

void set_active(bool is_active);
Set the state of the indicator.

bool get_active()const;
Return the state of the indicator.

signal void toggled(BaseObjectType);
Emitted on a change of button state.

GtkToggleButton *gtkobj();
const GtkToggleButton *gtkobj()const;
static bool isGtkToggleButton(Gtk_Object *checkcast);
Protected member index:


virtual void *get_parent_class();
virtual void toggled_impl();
Private member index:


GtkType get_type();

Public member details:


Gtk_ToggleButton
Gtk_ToggleButton::Gtk_ToggleButton();

Create an empty toggle button.
With an empty button, you can Gtk_Button::add() a widget such as a Gtk_Pixmap or Gtk_Box.

If you just wish to add a Gtk_Label, you may want to use the

Gtk_ToggleButton(const string &label) ctor 
 directly instead.


Gtk_ToggleButton
Gtk_ToggleButton::Gtk_ToggleButton(const string &label);

Create a check button with a label.
You won't be able to add a widget in this button since it already has a Gtk_Label in it.


set_mode
void Gtk_ToggleButton::set_mode(bool draw_indicator);

Set whether the indicator will be drawn.
See draw_indicator.


get_mode
bool Gtk_ToggleButton::get_mode()const;

Returns whether the indicator will be drawn.
See draw_indicator.


get_active
bool Gtk_ToggleButton::get_active()const;

Return the state of the indicator.
See active. See active.


toggled
signal void Gtk_ToggleButton::toggled(BaseObjectType);

Emitted on a change of button state.
Triggered when the button changes state (Note : changing the button's state with set_active() will also trigger this signal).


Protected member details:



Private member details:



Examples:





(pages generated by PERCEPS -script.)