## GnomeDbDataEntry GnomeDbDataEntry — Interface which provides the user with specific widgets to manipulate data |

## Synopsis

                        GnomeDbDataEntry;
    void                gnome_db_data_entry_set_value_type  (GnomeDbDataEntry *de,
                                                             GType type);
    GType               gnome_db_data_entry_get_value_type  (GnomeDbDataEntry *de);
    void                gnome_db_data_entry_set_value       (GnomeDbDataEntry *de,
                                                             const GValue *value);
    GValue*             gnome_db_data_entry_get_value       (GnomeDbDataEntry *de);
    gboolean            gnome_db_data_entry_is_contents_valid
                                                            (GnomeDbDataEntry *de,
                                                             GError **error);
    void                gnome_db_data_entry_set_value_orig  (GnomeDbDataEntry *de,
                                                             const GValue *value);
    void                gnome_db_data_entry_set_current_as_orig
                                                            (GnomeDbDataEntry *de);
    const GValue*       gnome_db_data_entry_get_value_orig  (GnomeDbDataEntry *de);
    void                gnome_db_data_entry_set_value_default
                                                            (GnomeDbDataEntry *de,
                                                             const GValue *value);
    void                gnome_db_data_entry_set_attributes  (GnomeDbDataEntry *de,
                                                             GdaValueAttribute attrs,
                                                             GdaValueAttribute mask);
    GdaValueAttribute   gnome_db_data_entry_get_attributes  (GnomeDbDataEntry *de);
    GdaDataHandler*     gnome_db_data_entry_get_handler     (GnomeDbDataEntry *de);
    gboolean            gnome_db_data_entry_expand_in_layout
                                                            (GnomeDbDataEntry *de);
    void                gnome_db_data_entry_set_editable    (GnomeDbDataEntry *de,
                                                             gboolean editable);
    void                gnome_db_data_entry_grab_focus      (GnomeDbDataEntry *de);

## Object Hierarchy

      GInterface
       +----GnomeDbDataEntry

## Known Implementations

GnomeDbDataEntry is implemented by GnomeDbEntryTimestamp, GnomeDbEntryPassword, GnomeDbEntryDate, GnomeDbEntryNone, GnomeDbEntryCommonTime, GnomeDbEntryWrapper, GnomeDbEntryBoolean, GnomeDbEntryFilesel, GnomeDbEntryTime, GnomeDbEntryCombo, GnomeDbEntryString, GnomeDbEntryCidr and GnomeDbEntryText.

## Signals

      "contents-activated"                             : Run First
      "contents-modified"                              : Run First
      "contents-valid"                                 : Run Last
      "status-changed"                                 : Run First

## Description

This interface is implemented by widgets to enable users to manipulate data of different types. Such widgets are created by objects implementing the GdaDataHandler interface.

## Details

### GnomeDbDataEntry

    typedef struct _GnomeDbDataEntry GnomeDbDataEntry;

### gnome_db_data_entry_set_value_type ()

    void                gnome_db_data_entry_set_value_type  (GnomeDbDataEntry *de,
                                                             GType type);

Sets the type of value the GnomeDbDataEntry will handle. The type must be compatible with what the widget can handle.

`de` : | a GtkWidget object which implements the GnomeDbDataEntry interface
`type` : |

### gnome_db_data_entry_get_value_type ()

    GType               gnome_db_data_entry_get_value_type  (GnomeDbDataEntry *de);

Fetch the type of data the GnomeDbDataEntry handles

`de` : | a GtkWidget object which implements the GnomeDbDataEntry interface
Returns : | the GType type

### gnome_db_data_entry_set_value ()

    void                gnome_db_data_entry_set_value       (GnomeDbDataEntry *de,
                                                             const GValue *value);

Push a value into the GnomeDbDataEntry. The value parameter must either be: - NULL or of type GDA_TYPE_NULL, or - of type specified using gnome_db_data_entry_set_value_type.

`de` : | a GtkWidget object which implements the GnomeDbDataEntry interface
`value` : |

### gnome_db_data_entry_get_value ()

    GValue*             gnome_db_data_entry_get_value       (GnomeDbDataEntry *de);

Fetch the value held in the GnomeDbDataEntry widget. If the value is set to NULL, the returned value is of type GDA_TYPE_NULL. If the value is set to default, then the returned value is of type GDA_TYPE_NULL or is the default value if it has been provided to the widget (and is of the same type as the one provided by `de`).

`de` : | a GtkWidget object which implements the GnomeDbDataEntry interface
Returns : | a new GValue

### gnome_db_data_entry_is_contents_valid ()

    gboolean            gnome_db_data_entry_is_contents_valid
                                                            (GnomeDbDataEntry *de,
                                                             GError **error);

Tests the validity of `de`'s contents. The validity is a determined from:

- the `de` widget itself if it is capable of doing it (depending on the implementation)

- the results of the "contents_valid" signal which can be connected from

`de` : | a GtkWidget object which implements the GnomeDbDataEntry interface
`error` : | a place to store an error, or `NULL`
Returns : | TRUE if `de`'s contents is valid

### gnome_db_data_entry_set_value_orig ()

    void                gnome_db_data_entry_set_value_orig  (GnomeDbDataEntry *de,
                                                             const GValue *value);

Push a value into the GnomeDbDataEntry in the same way as `gnome_db_data_entry_set_value()` but also sets this value as the original value.

`de` : | a GtkWidget object which implements the GnomeDbDataEntry interface
`value` : |

### gnome_db_data_entry_set_current_as_orig ()

    void                gnome_db_data_entry_set_current_as_orig
                                                            (GnomeDbDataEntry *de);

Tells that the current value in `de` is to be considered as the original value

`de` : | a GtkWidget object which implements the GnomeDbDataEntry interface

### gnome_db_data_entry_get_value_orig ()

    const GValue*       gnome_db_data_entry_get_value_orig  (GnomeDbDataEntry *de);

Fetch the original value held in the GnomeDbDataEntry widget

`de` : | a GtkWidget object which implements the GnomeDbDataEntry interface
Returns : | the GValue

### gnome_db_data_entry_set_value_default ()

    void                gnome_db_data_entry_set_value_default
                                                            (GnomeDbDataEntry *de,
                                                             const GValue *value);

Sets the default value for the GnomeDbDataEntry which gets displayed when the user forces the default value. If it is not set then it is set to type GDA_TYPE_NULL. The value parameter must either be: - NULL or of type GDA_TYPE_NULL, or - of type specified using gnome_db_data_entry_set_value_type.

`de` : | a GtkWidget object which implements the GnomeDbDataEntry interface
`value` : |

### gnome_db_data_entry_set_attributes ()

    void                gnome_db_data_entry_set_attributes  (GnomeDbDataEntry *de,
                                                             GdaValueAttribute attrs,
                                                             GdaValueAttribute mask);

Sets the parameters of the GnomeDbDataEntry. Only the attributes corresponding to the mask are set, the other ones are ignored.

`de` : | a GtkWidget object which implements the GnomeDbDataEntry interface
`attrs` : | the attributes to set (OR'ed between them)
`mask` : | the mask corresponding to the considered attributes

### gnome_db_data_entry_get_attributes ()

    GdaValueAttribute   gnome_db_data_entry_get_attributes  (GnomeDbDataEntry *de);

Retreives the parameters of the GnomeDbDataEntry widget.

`de` : | a GtkWidget object which implements the GnomeDbDataEntry interface
Returns : | the OR'ed bits corresponding to the attributes.

### gnome_db_data_entry_get_handler ()

    GdaDataHandler*     gnome_db_data_entry_get_handler     (GnomeDbDataEntry *de);

Fetch the GdaDataHandler the GnomeDbDataEntry is using

`de` : | a GtkWidget object which implements the GnomeDbDataEntry interface
Returns : | the GdaDataHandler object

### gnome_db_data_entry_expand_in_layout ()

    gboolean            gnome_db_data_entry_expand_in_layout
                                                            (GnomeDbDataEntry *de);

Used for the layout of the widget in containers.

`de` : | a GtkWidget object which implements the GnomeDbDataEntry interface
Returns : | TRUE if the widget should expand

### gnome_db_data_entry_set_editable ()

    void                gnome_db_data_entry_set_editable    (GnomeDbDataEntry *de,
                                                             gboolean editable);

Set if `de` can be modified or not by the user

`de` : | a GtkWidget object which implements the GnomeDbDataEntry interface
`editable` : |

### gnome_db_data_entry_grab_focus ()

    void                gnome_db_data_entry_grab_focus      (GnomeDbDataEntry *de);

Makes `de` grab the focus for the window it's in

`de` : | a GtkWidget object which implements the GnomeDbDataEntry interface

## Signal Details

### The `"contents-activated"` signal

    void                user_function                      (GnomeDbDataEntry *dbdataentry,
                                                            gpointer          user_data)        : Run First

`dbdataentry` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.

### The `"contents-modified"` signal

    void                user_function                      (GnomeDbDataEntry *dbdataentry,
                                                            gpointer          user_data)        : Run First

`dbdataentry` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.

### The `"contents-valid"` signal

    gboolean            user_function                      (GnomeDbDataEntry *dbdataentry,
                                                            gpointer          arg1,
                                                            gpointer          user_data)        : Run Last

`dbdataentry` : | the object which received the signal.
`arg1` : |
`user_data` : | user data set when the signal handler was connected.
Returns : |

### The `"status-changed"` signal

    void                user_function                      (GnomeDbDataEntry *dbdataentry,
                                                            gpointer          user_data)        : Run First

`dbdataentry` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.

## See Also

The GdaDictType class and GdaDataHandler interface.