libgda-uimm: Gnome::GdaUI::Combo Class Reference
Combo - Combo box to choose from the contents of a Gnome::Gda::DataModel. More...
#include <libgda-uimm/combo.h>
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 () | |
Create a new GdauiCombo widget. | |
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
Constructor & Destructor Documentation
virtual Gnome::GdaUI::Combo::~Combo | ( | ) | [virtual] |
Gnome::GdaUI::Combo::Combo | ( | ) |
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.
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.
- Parameters:
-
add_null Set to true
to add a0
value to the combo box.
GdauiCombo* Gnome::GdaUI::Combo::gobj | ( | ) | [inline] |
Provides access to the underlying C GtkObject.
Reimplemented from Gnome::GdaUI::DataSelector.
Reimplemented in Gnome::GdaUI::ProviderSelector.
const GdauiCombo* Gnome::GdaUI::Combo::gobj | ( | ) | const [inline] |
Provides access to the underlying C GtkObject.
Reimplemented from Gnome::GdaUI::DataSelector.
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:
true
if the0
value is selected.
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.
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.
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.
- 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.