gntcombobox.h File Reference
GNT (GLib Ncurses Toolkit)

Combobox API. More...

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

Go to the source code of this file.

## Data Structures

struct | _GntComboBox
struct | _GntComboBoxClass

## Macros

#define | GNT_TYPE_COMBO_BOX (gnt_combo_box_get_gtype())
#define | GNT_COMBO_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_COMBO_BOX, GntComboBox))
#define | GNT_COMBO_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GNT_TYPE_COMBO_BOX, GntComboBoxClass))
#define | GNT_IS_COMBO_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_COMBO_BOX))
#define | GNT_IS_COMBO_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_COMBO_BOX))
#define | GNT_COMBO_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_COMBO_BOX, GntComboBoxClass))
#define | GNT_COMBO_BOX_FLAGS(obj) (GNT_COMBO_BOX(obj)->priv.flags)
#define | GNT_COMBO_BOX_SET_FLAGS(obj, flags) (GNT_COMBO_BOX_FLAGS(obj) |= flags)
#define | GNT_COMBO_BOX_UNSET_FLAGS(obj, flags) (GNT_COMBO_BOX_FLAGS(obj) &= ~(flags))

## Typedefs

typedef struct _GntComboBox | GntComboBox
typedef struct _GntComboBoxPriv | GntComboBoxPriv
typedef struct _GntComboBoxClass | GntComboBoxClass

## Functions

G_BEGIN_DECLS GType | gnt_combo_box_get_gtype (void)
GntWidget * | gnt_combo_box_new (void)
| Create a new GntComboBox. More...
void | gnt_combo_box_add_data (GntComboBox *box, gpointer key, const char *text)
| Add an entry. More...
void | gnt_combo_box_remove (GntComboBox *box, gpointer key)
| Remove an entry. More...
void | gnt_combo_box_remove_all (GntComboBox *box)
| Remove all entries. More...
gpointer | gnt_combo_box_get_selected_data (GntComboBox *box)
| Get the data that is currently selected. More...
void | gnt_combo_box_set_selected (GntComboBox *box, gpointer key)
| Set the current selection to a specific entry. More...

## Detailed Description

Combobox API.

Definition in file gntcombobox.h.

## Function Documentation

void gnt_combo_box_add_data | ( | GntComboBox * | box,
|  | gpointer | key,
|  | const char * | text
| ) |  |

Add an entry.

Parameters

  box | The GntComboBox
  key | The data
  text | The text to display

G_BEGIN_DECLS GType gnt_combo_box_get_gtype | ( | void |  | ) |

Returns
  Get the GType for GntComboBox

gpointer gnt_combo_box_get_selected_data | ( | GntComboBox * | box | ) |

Get the data that is currently selected.

Parameters

  box | The GntComboBox

Returns
  The data of the currently selected entry

GntWidget* gnt_combo_box_new | ( | void |  | ) |

Create a new GntComboBox.

Returns
  A new GntComboBox

void gnt_combo_box_remove | ( | GntComboBox * | box,
|  | gpointer | key
| ) |  |

Remove an entry.

Parameters

  box | The GntComboBox
  key | The data to be removed

void gnt_combo_box_remove_all | ( | GntComboBox * | box | ) |

Remove all entries.

Parameters

  box | The GntComboBox

void gnt_combo_box_set_selected | ( | GntComboBox * | box,
|  | gpointer | key
| ) |  |

Set the current selection to a specific entry.

Parameters

  box | The GntComboBox
  key | The data to be set to