## GnomeDbEntryCombo

GnomeDbEntryCombo — A combo box to choose a value from a GnomeDbDataSet

##

# Synopsis

    struct      GnomeDbEntryCombo;
    GType       gnome_db_entry_combo_get_type   (void);
    GtkWidget*  gnome_db_entry_combo_new        (GnomeDbDataSet *data_set,
                                                 GnomeDbDataSetNode *node);
    gboolean    gnome_db_entry_combo_set_values (GnomeDbEntryCombo *combo,
                                                 GSList *values);
    GSList*     gnome_db_entry_combo_get_values (GnomeDbEntryCombo *combo);
    void        gnome_db_entry_combo_set_values_orig
                                                (GnomeDbEntryCombo *combo,
                                                 GSList *values);
    GSList*     gnome_db_entry_combo_get_values_orig
                                                (GnomeDbEntryCombo *combo);
    void        gnome_db_entry_combo_set_values_default
                                                (GnomeDbEntryCombo *combo,
                                                 GSList *values);

## Object Hierarchy

      GObject
       +----GtkObject
             +----GtkWidget
                   +----GtkContainer
                         +----GtkBin
                               +----GtkViewport
                                     +----GnomeDbEntryShell
                                           +----GnomeDbEntryCombo

## Implemented Interfaces

GnomeDbEntryCombo implements AtkImplementorIface and GnomeDbDataEntry.

## Properties

      "set-default-if-invalid" gboolean             : Read / Write

## Description

This widget allows the user to select one or several value(s) from a set of possibilities, stored within a GnomeDbDataModel object. Specifically, it uses a GnomeDbDataSetNode (within a GnomeDbDataSet object), and synchonizes the values of the GnomeDbParameter objects in that GnomeDbDataSetNode.

## Details

### struct GnomeDbEntryCombo

    struct GnomeDbEntryCombo;

### gnome_db_entry_combo_get_type ()

    GType       gnome_db_entry_combo_get_type   (void);

Returns : |

### gnome_db_entry_combo_new ()

    GtkWidget*  gnome_db_entry_combo_new        (GnomeDbDataSet *data_set,
                                                 GnomeDbDataSetNode *node);

Creates a new GnomeDbEntryCombo widget. The widget is a combo box which displays a selectable list of items (the items come from the 'node->data_for_param' data model)

The widget allows the simultaneuos selection of one or more values (one for each 'node->params') while proposing potentially "more readable" choices.

`data_set` : | a GnomeDbDataSet object
`node` : | a GnomeDbDataSetNode structure, part of `data_set`
Returns : | the new widget

### gnome_db_entry_combo_set_values ()

    gboolean    gnome_db_entry_combo_set_values (GnomeDbEntryCombo *combo,
                                                 GSList *values);

Sets the values of `combo` to the specified ones. None of the values provided in the list is modified.

`values` holds a list of GdaValue values, one for each parameter that is present in the `node` argument of the `gnome_db_entry_combo_new()` function which created `combo`.

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;

`combo` : | a GnomeDbEntryCombo widet
`values` : | a list of GdaValue values, or `NULL`
Returns : | TRUE if no error occured.

### gnome_db_entry_combo_get_values ()

    GSList*     gnome_db_entry_combo_get_values (GnomeDbEntryCombo *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 GnomeDbEntryCombo widet
Returns : | a new list of values

### gnome_db_entry_combo_set_values_orig ()

    void        gnome_db_entry_combo_set_values_orig
                                                (GnomeDbEntryCombo *combo,
                                                 GSList *values);

Sets the original values of `combo` to the specified ones. None of the values provided in the list is modified.

`combo` : | a GnomeDbEntryCombo widet
`values` : | a list of GdaValue values

### gnome_db_entry_combo_get_values_orig ()

    GSList*     gnome_db_entry_combo_get_values_orig
                                                (GnomeDbEntryCombo *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 GnomeDbEntryCombo widet
Returns : | a new list of values

### gnome_db_entry_combo_set_values_default ()

    void        gnome_db_entry_combo_set_values_default
                                                (GnomeDbEntryCombo *combo,
                                                 GSList *values);

Sets the default values of `combo` to the specified ones. None of the values provided in the list is modified.

`combo` : | a GnomeDbEntryCombo widet
`values` : | a list of GdaValue values

## Properties

"`set-default-if-invalid`" (gboolean : Read / Write) |