MgEntryCombo

Name

MgEntryCombo -- A combo box to choose a value from a MgContext

Synopsis



#define     MG_ENTRY_COMBO_TYPE
#define     MG_ENTRY_COMBO                  (obj)
#define     MG_ENTRY_COMBO_CLASS            (klass)
#define     IS_MG_ENTRY_COMBO               (obj)
struct      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);

Object Hierarchy


  GObject
   +----GtkObject
         +----GtkWidget
               +----GtkContainer
                     +----GtkBin
                           +----GtkViewport
                                 +----MgEntryShell
                                       +----MgEntryCombo

Implemented Interfaces

MgEntryCombo implements MgDataEntry and AtkImplementorIface.

Properties


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

Description

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.

Details

MG_ENTRY_COMBO_TYPE

#define MG_ENTRY_COMBO_TYPE          (mg_entry_combo_get_type())


MG_ENTRY_COMBO()

#define MG_ENTRY_COMBO(obj)          G_TYPE_CHECK_INSTANCE_CAST (obj, mg_entry_combo_get_type(), MgEntryCombo)

obj :


MG_ENTRY_COMBO_CLASS()

#define MG_ENTRY_COMBO_CLASS(klass)  G_TYPE_CHECK_CLASS_CAST (klass, mg_entry_combo_get_type (), MgEntryComboClass)

klass :


IS_MG_ENTRY_COMBO()

#define IS_MG_ENTRY_COMBO(obj)       G_TYPE_CHECK_INSTANCE_TYPE (obj, mg_entry_combo_get_type ())

obj :


struct MgEntryCombo

struct MgEntryCombo;


mg_entry_combo_get_type ()

guint       mg_entry_combo_get_type         (void);

Returns :


mg_entry_combo_new ()

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


mg_entry_combo_set_values ()

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


mg_entry_combo_get_values ()

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


mg_entry_combo_set_values_orig ()

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


mg_entry_combo_get_values_orig ()

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


mg_entry_combo_set_values_default ()

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

Properties

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