Main Page Widgets Namespaces Book

# Gtk::ComboBox Class Reference
[Widgets]

Inheritance diagram for Gtk::ComboBox:

[legend]
List of all members.

## Detailed Description

See also ComboBoxText, which is specialised for a single text column.

## Public Member Functions
virtual | ~ComboBox ()
GtkComboBox* | gobj ()
| Provides access to the underlying C GtkObject.
const GtkComboBox* | gobj () const
| Provides access to the underlying C GtkObject.
| ComboBox ()
| ComboBox (const Glib::RefPtr<TreeModel>& model)
void | set_wrap_width (int width)
| Sets the wrap width of combo_box to be width .
void | set_row_span_column (int row_span)
| Sets the column with row span information for combo_box to be row_span .
void | set_column_span_column (int column_span)
| Sets the column with column span information for combo_box to be column_span .
int | get_active_row_number () const
| Returns the index of the currently active item, or -1 if there's no active item.
TreeModel::iterator | get_active ()
TreeModel::const_iterator | get_active () const
void | set_active (int index)
| Sets the active item of combo_box to be the item at index .
void | set_active (const TreeModel::iterator& iter)
| Sets the current active item to be the one referenced by iter .
void | unset_active ()
Glib::RefPtr<TreeModel> | get_model ()
| Returns the Gtk::TreeModel which is acting as data source for combo_box .
Glib::RefPtr<const TreeModel> | get_model () const
| Returns the Gtk::TreeModel which is acting as data source for combo_box .
void | set_model (const Glib::RefPtr<TreeModel>& model)
| Sets the model used by combo_box to be model .
void | popup ()
| Pops up the menu or dropdown list of combo_box .
void | popdown ()
| Hides the menu or dropdown list of combo_box .
Glib::PropertyProxy< Glib::RefPtr< TreeModel > > | property_model ()
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<TreeModel >> | property_model () const
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<int> | property_wrap_width ()
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< int > | property_wrap_width () const
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<int> | property_row_span_column ()
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< int > | property_row_span_column () const
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<int> | property_column_span_column ()
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< int > | property_column_span_column () const
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<int> | property_active ()
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< int > | property_active () const
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::SignalProxy0<void> | signal_changed ()
## Protected Member Functions
virtual void | on_changed ()
## Related Functions
(Note that these are not member functions.)
Gtk::ComboBox* | wrap (GtkComboBox* object, bool take_copy=false)

## Constructor & Destructor Documentation

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

Gtk::ComboBox::ComboBox | ( |  | ) |

Gtk::ComboBox::ComboBox | ( | const Glib::RefPtr<TreeModel>& | model | ) | `[explicit]`

## Member Function Documentation

TreeModel::const_iterator Gtk::ComboBox::get_active | ( |  | ) | const

TreeModel::iterator Gtk::ComboBox::get_active | ( |  | ) |

int Gtk::ComboBox::get_active_row_number | ( |  | ) | const

| Returns the index of the currently active item, or -1 if there's no active item. Returns: An integer which is the index of the currently active item, or -1 if there's no active item. Since: 2.4.

Glib::RefPtr<const TreeModel> Gtk::ComboBox::get_model | ( |  | ) | const

| Returns the Gtk::TreeModel which is acting as data source for combo_box . Returns: A Gtk::TreeModel which was passed during construction. Since: 2.4.

Glib::RefPtr<TreeModel> Gtk::ComboBox::get_model | ( |  | ) |

| Returns the Gtk::TreeModel which is acting as data source for combo_box . Returns: A Gtk::TreeModel which was passed during construction. Since: 2.4.

const GtkComboBox* Gtk::ComboBox::gobj | ( |  | ) | const`[inline]`

| Provides access to the underlying C GtkObject. Reimplemented from Gtk::Bin. Reimplemented in Gtk::ComboBoxEntry.

GtkComboBox* Gtk::ComboBox::gobj | ( |  | ) | `[inline]`

| Provides access to the underlying C GtkObject. Reimplemented from Gtk::Bin. Reimplemented in Gtk::ComboBoxEntry.

virtual void Gtk::ComboBox::on_changed | ( |  | ) | `[protected, virtual]`

void Gtk::ComboBox::popdown | ( |  | ) |

| Hides the menu or dropdown list of combo_box . This function is mostly intended for use by accessibility technologies; applications should have little use for it. Since: 2.4

void Gtk::ComboBox::popup | ( |  | ) |

| Pops up the menu or dropdown list of combo_box . This function is mostly intended for use by accessibility technologies; applications should have little use for it. Since: 2.4

Glib::PropertyProxy_ReadOnly<int> Gtk::ComboBox::property_active | ( |  | ) | const

| You rarely need to use properties because there are get_ and set_ methods for almost all of them. Returns: A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<int> Gtk::ComboBox::property_active | ( |  | ) |

| You rarely need to use properties because there are get_ and set_ methods for almost all of them. Returns: A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<int> Gtk::ComboBox::property_column_span_column | ( |  | ) | const

| You rarely need to use properties because there are get_ and set_ methods for almost all of them. Returns: A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<int> Gtk::ComboBox::property_column_span_column | ( |  | ) |

| You rarely need to use properties because there are get_ and set_ methods for almost all of them. Returns: A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<Glib::RefPtr<TreeModel>> Gtk::ComboBox::property_model | ( |  | ) | const

| You rarely need to use properties because there are get_ and set_ methods for almost all of them. Returns: A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<Glib::RefPtr<TreeModel>> Gtk::ComboBox::property_model | ( |  | ) |

| You rarely need to use properties because there are get_ and set_ methods for almost all of them. Returns: A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<int> Gtk::ComboBox::property_row_span_column | ( |  | ) | const

| You rarely need to use properties because there are get_ and set_ methods for almost all of them. Returns: A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<int> Gtk::ComboBox::property_row_span_column | ( |  | ) |

| You rarely need to use properties because there are get_ and set_ methods for almost all of them. Returns: A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<int> Gtk::ComboBox::property_wrap_width | ( |  | ) | const

| You rarely need to use properties because there are get_ and set_ methods for almost all of them. Returns: A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<int> Gtk::ComboBox::property_wrap_width | ( |  | ) |

| You rarely need to use properties because there are get_ and set_ methods for almost all of them. Returns: A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

void Gtk::ComboBox::set_active | ( | const TreeModel::iterator& | iter | ) |

  | Sets the current active item to be the one referenced by iter . iter must correspond to a path of depth one. Since: 2.4 Parameters:
  | iter | The Gtk::TreeIter.

void Gtk::ComboBox::set_active | ( | int | index | ) |

  | Sets the active item of combo_box to be the item at index . Since: 2.4 Parameters:
  | index | An index in the model passed during construction, or -1 to have no active item.

void Gtk::ComboBox::set_column_span_column | ( | int | column_span | ) |

  | Sets the column with column span information for combo_box to be column_span . The column span column contains integers which indicate how many columns an item should span. Since: 2.4 Parameters:
  | column_span | A column in the model passed during construction.

void Gtk::ComboBox::set_model | ( | const Glib::RefPtr<TreeModel>& | model | ) |

  | Sets the model used by combo_box to be model . Will unset a previously set model (if applicable). Since: 2.4 Parameters:
  | model | A Gtk::TreeModel.

void Gtk::ComboBox::set_row_span_column | ( | int | row_span | ) |

  | Sets the column with row span information for combo_box to be row_span . The row span column contains integers which indicate how many rows an item should span. Since: 2.4 Parameters:
  | row_span | A column in the model passed during construction.

void Gtk::ComboBox::set_wrap_width | ( | int | width | ) |

  | Sets the wrap width of combo_box to be width . The wrap width is basically the preferred number of columns when you want to the popup to be layed out in a table. Since: 2.4 Parameters:
  | width | Preferred number of columns.

Glib::SignalProxy0<void> Gtk::ComboBox::signal_changed | ( |  | ) |

void Gtk::ComboBox::unset_active | ( |  | ) |

## Friends And Related Function Documentation

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

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

- combobox.h