---
name: "Gtk_ToggleButton"
section: "3"
platform: "linux"
package: "libgtkmm-dev"
version: "1.0.3-1.1"
release: "Debian 2.2 (Potato)"
platforms: ["linux"]
url: "https://new.carta.tech/Gtk_ToggleButton"
---

# Gtk\_ToggleButton(3)

## NAME - Gtk\_ToggleButton

## HEADER REQUIRED

**#include \<gtk--/togglebutton.h&gt;\>**

## BASE CLASSES

[Gtk\_Button(3)](/Gtk_Button/3.md)

## DERIVED BY

[Gtk\_CheckButton(3)](/Gtk_CheckButton/3.md)

## PROPERTIES

- *active*

  Type: guint:1\
   Get:  **get\_active**()\
   Set:  **set\_active**()\

-

   Whether the button is toggled on (e.g. active) or off\

- *draw\_indicator*

  Type: guint:1\
   Get:  **get\_mode**()\
   Set:  **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

```
friend  CppClassType;
typedef GtkToggleButton  BaseObjectType;
typedef GtkToggleButtonClass  BaseClassType;
virtual void * get_parent_class();
virtual void  toggled_impl();
```

## PRIVATE MEMBER INDEX

```
static CppClassType  toggle_button_class;
GtkType  get_type();
```

## PUBLIC MEMBER DESCRIPTIONS

- 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** (*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.\

- void Gtk\_ToggleButton::**set\_mode** (*bool draw\_indicator*);

  Set whether the indicator will be drawn..\
   See *draw\_indicator*.\

- bool Gtk\_ToggleButton::**get\_mode** () const;

  Returns whether the indicator will be drawn..\
   See *draw\_indicator*.\

- bool Gtk\_ToggleButton::**get\_active** () const;

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

- 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 DESCRIPTIONS

## PRIVATE MEMBER DESCRIPTIONS
