Public Member Functions | Related Functions

# Gtk::ComboBoxText Class Reference
[Widgets]

This is a simple variant of ComboBox that hides the model-view complexity for simple text-only use cases. More...

Inheritance diagram for Gtk::ComboBoxText:
[legend]
Collaboration diagram for Gtk::ComboBoxText:
[legend]

List of all members.

## Public Member Functions
virtual | ~ComboBoxText ()
GtkComboBoxText* | gobj ()
| Provides access to the underlying C GtkObject.
const GtkComboBoxText* | gobj () const
| Provides access to the underlying C GtkObject.
| ComboBoxText (bool has_entry=false)
| Creates a new empty ComboBoxText, optionally with an entry.
| ComboBoxText (const Glib::RefPtr< TreeModel >& model, bool has_entry=false)
| Creates a new ComboBoxText with the model initialized to model.
void | append (const Glib::ustring& text)
void | append (const Glib::ustring& id, const Glib::ustring& text)
void | insert (int position, const Glib::ustring& text)
void | insert (int position, const Glib::ustring& id, const Glib::ustring& text)
void | prepend (const Glib::ustring& text)
void | prepend (const Glib::ustring& id, const Glib::ustring& text)
void | remove_text (int position)
Glib::ustring | get_active_text () const
void | remove_all ()
void | set_active_text (const Glib::ustring& text)
## Related Functions
(Note that these are not member functions.)
Gtk::ComboBoxText* | wrap (GtkComboBoxText* object, bool take_copy=false)
| A Glib::wrap() method for this object.

## Detailed Description

This is a simple variant of ComboBox that hides the model-view complexity for simple text-only use cases.

You can add items to a ComboBoxText with append_text(), insert_text() or prepend_text() and remove items with remove_text().

## Constructor & Destructor Documentation

virtual Gtk::ComboBoxText::~ComboBoxText | ( | ) | `[virtual]`

Gtk::ComboBoxText::ComboBoxText | ( | bool | has_entry = `false` ) | `[explicit]`

Creates a new empty ComboBoxText, optionally with an entry.

Parameters:

  has_entry | If this is true then this will have an Entry widget.

Gtk::ComboBoxText::ComboBoxText | ( | const Glib::RefPtr< TreeModel >& | model,
|  | bool | has_entry = `false`
| ) |  | `[explicit]`

Creates a new ComboBoxText with the model initialized to model.

Parameters:

  model | The model containing data to display in the ComboBoxText.
  has_entry | If this is true then this will have an Entry widget.

## Member Function Documentation

void Gtk::ComboBoxText::append | ( | const Glib::ustring & | text ) |

void Gtk::ComboBoxText::append | ( | const Glib::ustring & | id,
|  | const Glib::ustring & | text
| ) |  |

Glib::ustring Gtk::ComboBoxText::get_active_text | ( | ) | const

const GtkComboBoxText* Gtk::ComboBoxText::gobj | ( | ) | const`[inline]`

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::ComboBox.

GtkComboBoxText* Gtk::ComboBoxText::gobj | ( | ) | `[inline]`

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::ComboBox.

void Gtk::ComboBoxText::insert | ( | int | position,
|  | const Glib::ustring & | text
| ) |  |

void Gtk::ComboBoxText::insert | ( | int | position,
|  | const Glib::ustring & | id,
|  | const Glib::ustring & | text
| ) |  |

void Gtk::ComboBoxText::prepend | ( | const Glib::ustring & | id,
|  | const Glib::ustring & | text
| ) |  |

void Gtk::ComboBoxText::prepend | ( | const Glib::ustring & | text ) |

void Gtk::ComboBoxText::remove_all | ( | ) |

void Gtk::ComboBoxText::remove_text | ( | int | position ) |

void Gtk::ComboBoxText::set_active_text | ( | const Glib::ustring & | text ) |

## Friends And Related Function Documentation

Gtk::ComboBoxText* wrap | ( | GtkComboBoxText * | object,
|  | bool | take_copy = `false`
| ) |  | `[related]`

A Glib::wrap() method for this object.

Parameters:

  object | The C instance.
  take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref.

Returns:
  A C++ instance that wraps this C instance.

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

- gtkmm/comboboxtext.h