## GdauiCombo GdauiCombo — Combo box to choose from the contents of a GdaDataModel |

## Synopsis

                        GdauiCombo;
    GtkWidget *         gdaui_combo_new                     (void);
    GtkWidget *         gdaui_combo_new_with_model          (GdaDataModel *model,
                                                             gint n_cols,
                                                             gint *cols_index);
    void                gdaui_combo_set_model               (GdauiCombo *combo,
                                                             GdaDataModel *model,
                                                             gint n_cols,
                                                             gint *cols_index);
    void                gdaui_combo_add_null                (GdauiCombo *combo,
                                                             gboolean add_null);
    gboolean            gdaui_combo_is_null_selected        (GdauiCombo *combo);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----GtkObject
                   +----GtkWidget
                         +----GtkContainer
                               +----GtkBin
                                     +----GtkComboBox
                                           +----GdauiCombo
                                                 +----GdauiProviderSelector

## Implemented Interfaces

GdauiCombo implements AtkImplementorIface, GtkBuildable, GtkCellLayout, GtkCellEditable and GdauiDataSelector.

## Properties

      "as-list"                  gboolean              : Read / Write
      "model"                    GdaDataModel*         : Read / Write

## Description

## Details

### GdauiCombo

    typedef struct _GdauiCombo GdauiCombo;

### gdaui_combo_new ()

    GtkWidget *         gdaui_combo_new                     (void);

Create a new GdauiCombo widget.

Returns : | the newly-created widget.

Since 4.2

### gdaui_combo_new_with_model ()

    GtkWidget *         gdaui_combo_new_with_model          (GdaDataModel *model,
                                                             gint n_cols,
                                                             gint *cols_index);

Create a new GdauiCombo widget with a model. See `gdaui_combo_set_model()` for more information about the `n_cols` and `cols_index` usage.

`model` : | a GdaDataModel 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 4.2

### gdaui_combo_set_model ()

    void                gdaui_combo_set_model               (GdauiCombo *combo,
                                                             GdaDataModel *model,
                                                             gint n_cols,
                                                             gint *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 NULL `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`.

`combo` : | a GdauiCombo widget.
`model` : | a GdaDataModel 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`

Since 4.2

### gdaui_combo_add_null ()

    void                gdaui_combo_add_null                (GdauiCombo *combo,
                                                             gboolean add_null);

Tells if `combo` should add a special entry representing an "undefined choice", as a `NULL` entry. The default is that only the available choices in `combo`'s model are presented.

`combo` : | a GdauiCombo widget
`add_null` : | set to `TRUE` to add a NULL value to the combo box

Since 4.2

### gdaui_combo_is_null_selected ()

    gboolean            gdaui_combo_is_null_selected        (GdauiCombo *combo);

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

`combo` : | a GdauiCombo widget
Returns : | `TRUE` if the `NULL` value is selected

Since 4.2

## Property Details

### The `"as-list"` property

      "as-list"                  gboolean              : Read / Write

Default value: FALSE

### The `"model"` property

      "model"                    GdaDataModel*         : Read / Write