#include <combo.h>
Inheritance diagram for Gnome::Db::Combo:
Public Member Functions | |
virtual | ~Combo () |
GnomeDbCombo* | gobj () |
Provides access to the underlying C GtkObject. | |
const GnomeDbCombo* | gobj () const |
Provides access to the underlying C GtkObject. | |
Combo () | |
Combo (const Glib::RefPtr<Gda::DataModel>& model, const Glib::ArrayHandle<int>& cols_index) | |
void | set_model (const Glib::RefPtr<Gda::DataModel>& model, const Glib::ArrayHandle<int>& cols_index) |
Glib::RefPtr<Gda::DataModel> | get_model () |
This function returns the Gda::DataModel from which combo displays values. | |
Glib::RefPtr<const Gda::DataModel> | get_model () const |
This function returns the Gda::DataModel from which combo displays values. | |
bool | set_values (const Glib::SListHandle<Gda::Value>& values) |
Sets the currently selected row of combo from the values stored in values . | |
Glib::SListHandle<Gda::Value> | get_values () const |
Get a list of the currently selected values in combo . | |
bool | set_values (const Glib::SListHandle<Gda::Value>& values, const Glib::ArrayHandle<int>& cols_index) |
Sets the currently selected row of combo from the values stored in values , assuming that these values correspond to the columns listed in cols_index . | |
Glib::SListHandle<Gda::Value> | get_values (const Glib::ArrayHandle<int>& cols_index) const |
void | add_undef_choice (bool add_undef_choice=true) |
Tells if combo should add a special entry representing an "undefined choice". | |
bool | undef_selected () const |
Tell if the currently selected entry represents the "undefined choice" entry. | |
Related Functions | |
(Note that these are not member functions.) | |
Gnome::Db::Combo* | wrap (GnomeDbCombo* object, bool take_copy=false) |
virtual Gnome::Db::Combo::~Combo | ( | ) | [virtual] |
Gnome::Db::Combo::Combo | ( | ) |
Gnome::Db::Combo::Combo | ( | const Glib::RefPtr< Gda::DataModel > & | model, | |
const Glib::ArrayHandle< int > & | cols_index | |||
) | [explicit] |
void Gnome::Db::Combo::add_undef_choice | ( | bool | add_undef_choice = true |
) |
Tells if combo should add a special entry representing an "undefined choice".
The default is that only the available choices in combo 's model are presented.
Glib::RefPtr<const Gda::DataModel> Gnome::Db::Combo::get_model | ( | ) | const |
This function returns the Gda::DataModel from which combo displays values.
Reimplemented from Gtk::ComboBox.
Glib::RefPtr<Gda::DataModel> Gnome::Db::Combo::get_model | ( | ) |
This function returns the Gda::DataModel from which combo displays values.
Reimplemented from Gtk::ComboBox.
Glib::SListHandle<Gda::Value> Gnome::Db::Combo::get_values | ( | const Glib::ArrayHandle< int > & | cols_index | ) | const |
Glib::SListHandle<Gda::Value> Gnome::Db::Combo::get_values | ( | ) | const |
Get a list of the currently selected values in combo .
The list itself must be free'd using Glib::slist_free(), but not the values it contains.
WARNING: values will contain one value for each column set to be displayed when the data model was associated to combo .
0
if there is no displayed data in combo . const GnomeDbCombo* Gnome::Db::Combo::gobj | ( | ) | const [inline] |
Provides access to the underlying C GtkObject.
Reimplemented from Gtk::ComboBox.
Reimplemented in Gnome::Db::ProviderSelector.
GnomeDbCombo* Gnome::Db::Combo::gobj | ( | ) | [inline] |
Provides access to the underlying C GtkObject.
Reimplemented from Gtk::ComboBox.
Reimplemented in Gnome::Db::ProviderSelector.
void Gnome::Db::Combo::set_model | ( | const Glib::RefPtr< Gda::DataModel > & | model, | |
const Glib::ArrayHandle< int > & | cols_index | |||
) |
bool Gnome::Db::Combo::set_values | ( | const Glib::SListHandle< Gda::Value > & | values, | |
const Glib::ArrayHandle< int > & | cols_index | |||
) |
Sets the currently selected row of combo from the values stored in values , assuming that these values correspond to the columns listed in cols_index .
cols_index must contain at least as many int
as there are elements in values ;
if cols_index is 0
, then it is assumed that values has the same number of columns than combo 's data model and that the values in values are ordered in the same way as the columns of combo 's data model.
values | A list of G::Value objects. | |
cols_index | Array of int , index of column to which each value in values corresponds, or 0 . |
true
if a row in the model was found to match the list of values. bool Gnome::Db::Combo::set_values | ( | const Glib::SListHandle< Gda::Value > & | values | ) |
Sets the currently selected row of combo from the values stored in values .
WARNING: values must contain one value for each column set to be displayed when the data model was associated to combo .
values | A list of G::Value. |
true
if a row in the model was found to match the list of values. bool Gnome::Db::Combo::undef_selected | ( | ) | const |
Tell if the currently selected entry represents the "undefined choice" entry.
Gnome::Db::Combo* wrap | ( | GnomeDbCombo * | object, | |
bool | take_copy = false | |||
) | [related] |
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. |