# Gnome::GdaUI::Combo Class Reference

Combo - Combo box to choose from the contents of a Gnome::Gda::DataModel. More...

Inherits Gtk::ComboBox, and Gnome::GdaUI::DataSelector.

Inherited by Gnome::GdaUI::ProviderSelector.

Collaboration diagram for Gnome::GdaUI::Combo:
[legend]

List of all members.

## Public Member Functions

virtual | ~Combo ()
GdauiCombo* | gobj ()
| Provides access to the underlying C GtkObject.
const GdauiCombo* | gobj () const
| Provides access to the underlying C GtkObject.
| Combo (const Glib::RefPtr< Gnome::Gda::DataModel >& model, int n_cols, const Glib::ArrayHandle< int >& cols_index)
| Create a new GdauiCombo widget with a model.
void | set_model (const Glib::RefPtr< Gnome::Gda::DataModel >& model, int n_cols, const Glib::ArrayHandle< int >& cols_index)
| Makes combo display data stored in model (makes the combo widget refresh its list of values and display the values contained in the model).
void | add_null (bool add_null)
| Tells if combo should add a special entry representing an "undefined choice", as a `0` entry.
bool | is_null_selected () const
| Tell if the currently selected entry represents the "undefined choice" entry.
Glib::PropertyProxy< bool > | property_as_list ()
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly < bool > | property_as_list () const
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy < Glib::RefPtr < Gnome::Gda::DataModel > > | 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 < Gnome::Gda::DataModel > > | property_model () const
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.

## Related Functions

(Note that these are not member functions.)
Gnome::GdaUI::Combo* | wrap (GdauiCombo* object, bool take_copy=false)
| A Glib::wrap() method for this object.

## Detailed Description

Combo - Combo box to choose from the contents of a Gnome::Gda::DataModel.

## Constructor & Destructor Documentation

virtual Gnome::GdaUI::Combo::~Combo | ( |  | ) | `[virtual]`

Gnome::GdaUI::Combo::Combo | ( | const Glib::RefPtr< Gnome::Gda::DataModel > & | model,
|  | int | n_cols,
|  | const Glib::ArrayHandle< int > & | cols_index |
| ) |  |  | `[explicit]`

Create a new GdauiCombo widget with a model.

See set_model() for more information about the n_cols and cols_index usage.

Parameters:

  | model | A Gda::DataModel object.
  | n_cols | Number of columns in the model to be shown.
  | cols_index | An array of columns to be shown, its size must be n_cols.

Returns:
  The newly-created widget.

Since libgda-uimm 4.2:

## Member Function Documentation

void Gnome::GdaUI::Combo::add_null | ( | bool | add_null | ) |

Tells if combo should add a special entry representing an "undefined choice", as a `0` entry.

The default is that only the available choices in combo's model are presented.

Since libgda-uimm 4.2:

const GdauiCombo* Gnome::GdaUI::Combo::gobj | ( |  | ) | const`[inline]`

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::ComboBox.

Reimplemented in Gnome::GdaUI::ProviderSelector.

GdauiCombo* Gnome::GdaUI::Combo::gobj | ( |  | ) | `[inline]`

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::ComboBox.

Reimplemented in Gnome::GdaUI::ProviderSelector.

bool Gnome::GdaUI::Combo::is_null_selected | ( |  | ) | const

Tell if the currently selected entry represents the "undefined choice" entry.

Returns:

Since libgda-uimm 4.2:

Glib::PropertyProxy_ReadOnly<bool> Gnome::GdaUI::Combo::property_as_list | ( |  | ) | 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<bool> Gnome::GdaUI::Combo::property_as_list | ( |  | ) |

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<Gnome::Gda::DataModel> > Gnome::GdaUI::Combo::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.

Reimplemented from Gtk::ComboBox.

Glib::PropertyProxy< Glib::RefPtr<Gnome::Gda::DataModel> > Gnome::GdaUI::Combo::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.

Reimplemented from Gtk::ComboBox.

void Gnome::GdaUI::Combo::set_model | ( | const Glib::RefPtr< Gnome::Gda::DataModel > & | model,
|  | int | n_cols,
|  | const Glib::ArrayHandle< int > & | cols_index |
| ) |  |  |

Makes combo display data stored in model (makes the combo widget refresh its list of values and display the values contained in the model).

A `0` model will make the combo empty and disassociate the previous model, if any.

if n_cols is 0, then all the columns of model will be displayed in combo.

Since libgda-uimm 4.2:

Parameters:

  | model | A Gda::DataModel object.
  | n_cols | Number of columns in the model to be shown.
  | cols_index | An array of columns to be shown, its size must be n_cols.

## Friends And Related Function Documentation

Gnome::GdaUI::Combo* wrap | ( | GdauiCombo * | 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:

- libgda-uimm/combo.h