![]() |
![]() |
![]() |
Libmergeant Reference Manual | ![]() |
---|---|---|---|---|
MgEntryComboMgEntryCombo — A combo box to choose a value from a MgContext |
MgEntryCombo; guint mg_entry_combo_get_type (void); GtkWidget* mg_entry_combo_new (MgConf *conf, MgContext *context, MgContextNode *node); void mg_entry_combo_set_values (MgEntryCombo *combo, GList *values); GList* mg_entry_combo_get_values (MgEntryCombo *combo); void mg_entry_combo_set_values_orig (MgEntryCombo *combo, GList *values); GList* mg_entry_combo_get_values_orig (MgEntryCombo *combo); void mg_entry_combo_set_values_default (MgEntryCombo *combo, GList *values);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBin +----GtkViewport +----MgEntryShell +----MgEntryCombo
This widget allows the user to select a value (represented as a string) from a choice of multiple values. The possible values is constrained by the result of a SELECT query. When a value is selected, the widget then fills one or more MgParameter object(s) which correspond to the selected value.
The whole environment is specified by a MgContext object.
This object implements the MgDataEntry interface.
GtkWidget* mg_entry_combo_new (MgConf *conf, MgContext *context, MgContextNode *node);
Creates a new MgEntryCombo widget. The widget is a combo box which displays a selectable list of items (the items come from the result of the execution of the 'node->query' SELECT query). Thus the widget allows the simultaneuos selection of one or more values (one for each 'node->params') while proposing potentially "more readable" choices.
node
is not used afterwards.
conf : |
a MgConf object |
context : |
a MgContext object |
node : |
a MgContextNode structure, part of context
|
Returns : | the new widget |
void mg_entry_combo_set_values (MgEntryCombo *combo, GList *values);
Sets the values of combo
to the specified ones. None of the
values provided in the list is modified.
An error can occur when there is no corresponding value(s) to be displayed for the provided values.
If values
is NULL
, then the entry itself is set to NULL, and no error is returned if the entry
can be NULL.
combo : |
a MgEntryCombo widet |
values : |
a list of GdaValue values, or NULL
|
GList* mg_entry_combo_get_values (MgEntryCombo *combo);
Get the values stored within combo
. The returned values are a copy of the ones
within combo
, so they must be freed afterwards, the same for the list.
combo : |
a MgEntryCombo widet |
Returns : | a new list of values |
void mg_entry_combo_set_values_orig (MgEntryCombo *combo, GList *values);
Sets the original values of combo
to the specified ones. None of the
values provided in the list is modified.
combo : |
a MgEntryCombo widet |
values : |
a list of GdaValue values |
GList* mg_entry_combo_get_values_orig (MgEntryCombo *combo);
Get the original values stored within combo
. The returned values are the ones
within combo
, so they must not be freed afterwards; the list has to be freed afterwards.
combo : |
a MgEntryCombo widet |
Returns : | a new list of values |
void mg_entry_combo_set_values_default (MgEntryCombo *combo, GList *values);
Sets the default values of combo
to the specified ones. None of the
values provided in the list is modified.
combo : |
a MgEntryCombo widet |
values : |
a list of GdaValue values |