GnomeDbList

Name

GnomeDbList -- 

Synopsis



GtkWidget*  gnome_db_list_new               (GdaRecordset *recset,
                                             gint pos);
void        gnome_db_list_clear             (GnomeDbList *dblist);
gint        gnome_db_list_get_row_count     (GnomeDbList *dblist);
gchar*      gnome_db_list_get_string        (GnomeDbList *dblist);
GdaRecordset* gnome_db_list_get_recordset   (GnomeDbList *dblist);
void        gnome_db_list_set_recordset     (GnomeDbList *dblist,
                                             GdaRecordset *recset,
                                             gint pos);
GdkPixmap*  gnome_db_list_get_pixmap        (GnomeDbList *dblist,
                                             gint row);
void        gnome_db_list_set_pixmap        (GnomeDbList *dblist,
                                             gint row,
                                             GdkPixmap *pixmap,
                                             GdkBitmap *mask);
GdkBitmap*  gnome_db_list_get_pixmap_mask   (GnomeDbList *dblist,
                                             gint row);

Object Hierarchy


  GtkObject
   +----GtkWidget
         +----GtkContainer
               +----GtkBox
                     +----GtkVBox
                           +----GnomeDbList

Signal Prototypes


"loaded"    void        user_function      (GnomeDbList *dblist,
                                            gpointer user_data);
"select-row"
            void        user_function      (GnomeDbList *dblist,
                                            gpointer user_data);
"add-row"   void        user_function      (GnomeDbList *dblist,
                                            gint arg1,
                                            gpointer user_data);

Description

Details

gnome_db_list_new ()

GtkWidget*  gnome_db_list_new               (GdaRecordset *recset,
                                             gint pos);

Creates a new GnomeDbList widget

recset : recordset to be shown
pos : position of the field being shown
Returns : a pointer to the new widget, or NULL on error


gnome_db_list_clear ()

void        gnome_db_list_clear             (GnomeDbList *dblist);

Clears the DbList widget. It clears all entries in the list and frees the recordset associated

dblist : GnomeDbList widget


gnome_db_list_get_row_count ()

gint        gnome_db_list_get_row_count     (GnomeDbList *dblist);

Returns number of rows actually loaded in the recordset. As the list widget loads data asynchronously, you may call this function before all rows have been fetched from the database, in which case, it won't reflect the "real" number of rows returned in the recordset

dblist : GnomeDbList widget
Returns : number of rows in the recordset , or -1 on error


gnome_db_list_get_string ()

gchar*      gnome_db_list_get_string        (GnomeDbList *dblist);

Returns the currently selected item's text. That is, the literal of the first selected item

dblist : GnomeDbList widget
Returns : a string containing the literal selected, or NULL if none is selected or if there is an error


gnome_db_list_get_recordset ()

GdaRecordset* gnome_db_list_get_recordset   (GnomeDbList *dblist);

Returns the GdaRecordset object associated with the given GnomeDbList widget

dblist : GnomeDbList widget
Returns : a pointer to the GdaRecordset object being used, or NULL if none or if there is an error


gnome_db_list_set_recordset ()

void        gnome_db_list_set_recordset     (GnomeDbList *dblist,
                                             GdaRecordset *recset,
                                             gint pos);

Associates a GdaRecordset object with the given GnomeDbList widget and shows its contents

dblist : GnomeDbList widget
recset : recordset to be shown
pos : position of the field being shown


gnome_db_list_get_pixmap ()

GdkPixmap*  gnome_db_list_get_pixmap        (GnomeDbList *dblist,
                                             gint row);

dblist : GnomeDbList widget
row : row number
Returns :the pixmap being used for the given row


gnome_db_list_set_pixmap ()

void        gnome_db_list_set_pixmap        (GnomeDbList *dblist,
                                             gint row,
                                             GdkPixmap *pixmap,
                                             GdkBitmap *mask);

Sets the pixmap to be shown for the given row

dblist : GnomeDbList widget
row : row number
pixmap : GdkPixmap object
mask : 


gnome_db_list_get_pixmap_mask ()

GdkBitmap*  gnome_db_list_get_pixmap_mask   (GnomeDbList *dblist,
                                             gint row);

dblist : GnomeDbList widget
row : row number
Returns : 

Signals

The "loaded" signal

void        user_function                  (GnomeDbList *dblist,
                                            gpointer user_data);

dblist :the object which received the signal.
user_data :user data set when the signal handler was connected.


The "select-row" signal

void        user_function                  (GnomeDbList *dblist,
                                            gpointer user_data);

dblist :the object which received the signal.
user_data :user data set when the signal handler was connected.


The "add-row" signal

void        user_function                  (GnomeDbList *dblist,
                                            gint arg1,
                                            gpointer user_data);

dblist :the object which received the signal.
arg1 : 
user_data :user data set when the signal handler was connected.