Data Structures | Macros | Typedefs | Functions
gntcheckbox.h File Reference
GNT (GLib Ncurses Toolkit)

Checkbox API. More...

`#include "gntbutton.h"`
`#include "gnt.h"`
`#include "gntcolors.h"`
`#include "gntkeys.h"`

Go to the source code of this file.

## Data Structures
struct | _GntCheckBox
struct | _GntCheckBoxClass

## Macros
#define | GNT_TYPE_CHECK_BOX (gnt_check_box_get_gtype())
#define | GNT_CHECK_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_CHECK_BOX, GntCheckBox))
#define | GNT_CHECK_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GNT_TYPE_CHECK_BOX, GntCheckBoxClass))
#define | GNT_IS_CHECK_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_CHECK_BOX))
#define | GNT_IS_CHECK_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_CHECK_BOX))
#define | GNT_CHECK_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_CHECK_BOX, GntCheckBoxClass))
#define | GNT_CHECK_BOX_FLAGS(obj) (GNT_CHECK_BOX(obj)->priv.flags)
#define | GNT_CHECK_BOX_SET_FLAGS(obj, flags) (GNT_CHECK_BOX_FLAGS(obj) |= flags)
#define | GNT_CHECK_BOX_UNSET_FLAGS(obj, flags) (GNT_CHECK_BOX_FLAGS(obj) &= ~(flags))

## Typedefs
typedef struct _GntCheckBox | GntCheckBox
typedef struct _GntCheckBoxPriv | GntCheckBoxPriv
typedef struct _GntCheckBoxClass | GntCheckBoxClass

## Functions
G_BEGIN_DECLS GType | gnt_check_box_get_gtype (void)
GntWidget * | gnt_check_box_new (const char *text)
| Create a new checkbox. More...
void | gnt_check_box_set_checked (GntCheckBox *box, gboolean set)
| Set whether the checkbox should be checked or not. More...
gboolean | gnt_check_box_get_checked (GntCheckBox *box)
| Return the checked state of the checkbox. More...

## Detailed Description

Checkbox API.

Definition in file gntcheckbox.h.

## Function Documentation

## ◆ gnt_check_box_get_checked()

gboolean gnt_check_box_get_checked | ( | GntCheckBox * | box | ) |

Return the checked state of the checkbox.

Parameters

  box | The checkbox.

Returns
  `TRUE` if the checkbox is selected, `FALSE` otherwise.

## ◆ gnt_check_box_get_gtype()

G_BEGIN_DECLS GType gnt_check_box_get_gtype | ( | void |  | ) |

Returns
  GType for GntCheckBox

## ◆ gnt_check_box_new()

GntWidget* gnt_check_box_new | ( | const char * | text | ) |

Create a new checkbox.

Parameters

  text | The text for the checkbox.

Returns
  The newly created checkbox.

## ◆ gnt_check_box_set_checked()

void gnt_check_box_set_checked | ( | GntCheckBox * | box,
|  | gboolean | set
| ) |  |

Set whether the checkbox should be checked or not.

Parameters

  box | The checkbox.
  set | `TRUE` if the checkbox should be selected, `FALSE` otherwise.