GnomeDbDataWidget

GnomeDbDataWidget — Interface to control data bound widgets

Synopsis




GdaDataProxy* gnome_db_data_widget_get_proxy
                                            (GnomeDbDataWidget *iface);
void        gnome_db_data_widget_column_show
                                            (GnomeDbDataWidget *iface,
                                             gint column);
void        gnome_db_data_widget_column_hide
                                            (GnomeDbDataWidget *iface,
                                             gint column);
void        gnome_db_data_widget_column_set_editable
                                            (GnomeDbDataWidget *iface,
                                             gint column,
                                             gboolean editable);
void        gnome_db_data_widget_column_show_actions
                                            (GnomeDbDataWidget *iface,
                                             gint column,
                                             gboolean show_actions);
GtkActionGroup* gnome_db_data_widget_get_actions_group
                                            (GnomeDbDataWidget *iface);
void        gnome_db_data_widget_perform_action
                                            (GnomeDbDataWidget *iface,
                                             GnomeDbAction action);
GdaDataModelIter* gnome_db_data_widget_get_current_data
                                            (GnomeDbDataWidget *iface);
GdaDataModel* gnome_db_data_widget_get_gda_model
                                            (GnomeDbDataWidget *iface);
void        gnome_db_data_widget_set_gda_model
                                            (GnomeDbDataWidget *iface,
                                             GdaDataModel *model);

Description

Details

gnome_db_data_widget_get_proxy ()

GdaDataProxy* gnome_db_data_widget_get_proxy
                                            (GnomeDbDataWidget *iface);

Get a pointer to the GdaDataProxy being used by iface

iface : an object which implements the GnomeDbDataWidget interface
Returns : a GdaDataProxy pointer

gnome_db_data_widget_column_show ()

void        gnome_db_data_widget_column_show
                                            (GnomeDbDataWidget *iface,
                                             gint column);

Shows the data at column in the data model iface operates on

iface : an object which implements the GnomeDbDataWidget interface
column : column number to show

gnome_db_data_widget_column_hide ()

void        gnome_db_data_widget_column_hide
                                            (GnomeDbDataWidget *iface,
                                             gint column);

Hides the data at column in the data model iface operates on

iface : an object which implements the GnomeDbDataWidget interface
column : column number to hide

gnome_db_data_widget_column_set_editable ()

void        gnome_db_data_widget_column_set_editable
                                            (GnomeDbDataWidget *iface,
                                             gint column,
                                             gboolean editable);

Sets if the data entry in the iface widget at column (in the data model iface operates on) can be edited or not.

iface : an object which implements the GnomeDbDataWidget interface
column : column number of the data
editable :

gnome_db_data_widget_column_show_actions ()

void        gnome_db_data_widget_column_show_actions
                                            (GnomeDbDataWidget *iface,
                                             gint column,
                                             gboolean show_actions);

Sets if the data entry in the iface widget at column (in the data model iface operates on) must show its actions menu or not.

iface : an object which implements the GnomeDbDataWidget interface
column : column number of the data
show_actions :

gnome_db_data_widget_get_actions_group ()

GtkActionGroup* gnome_db_data_widget_get_actions_group
                                            (GnomeDbDataWidget *iface);

Each widget imlplementing the GnomeDbDataWidget interface provides actions. Actions can be triggered using the gnome_db_data_widget_perform_action() method, but using this method allows for the creation of toolbars, menus, etc calling these actions.

The actions are among:

  • Data edition actions: "ActionNew", "ActionCommit", "ActionDelete, "ActionUndelete, "ActionReset",

  • Record by record moving: "ActionFirstRecord", "ActionPrevRecord", "ActionNextRecord", "ActionLastRecord",

  • Chuncks of records moving: "ActionFirstChunck", "ActionPrevChunck", "ActionNextChunck", "ActionLastChunck".

iface : an object which implements the GnomeDbDataWidget interface
Returns : the GtkActionGroup with all the possible actions on the widget.

gnome_db_data_widget_perform_action ()

void        gnome_db_data_widget_perform_action
                                            (GnomeDbDataWidget *iface,
                                             GnomeDbAction action);

Forces the widget to perform the selected action, as if the user had pressed on the corresponding action button in the iface widget, if the corresponding action is possible and if the iface widget supports the action.

iface : an object which implements the GnomeDbDataWidget interface
action : a GnomeDbAction action

gnome_db_data_widget_get_current_data ()

GdaDataModelIter* gnome_db_data_widget_get_current_data
                                            (GnomeDbDataWidget *iface);

Get the GdaDataModelIter object which contains all the parameters which in turn contain the actual data stored in iface. When the user changes what's displayed or what's selected (depending on the actual widget) in iface, then the parameter's values change as well.

iface : an object which implements the GnomeDbDataWidget interface
Returns : the GdaParameterList object for data (not a new object)

gnome_db_data_widget_get_gda_model ()

GdaDataModel* gnome_db_data_widget_get_gda_model
                                            (GnomeDbDataWidget *iface);

Get the current GdaDataModel used by iface

iface : an object which implements the GnomeDbDataWidget interface
Returns : the GdaDataModel, or NULL if there is none

gnome_db_data_widget_set_gda_model ()

void        gnome_db_data_widget_set_gda_model
                                            (GnomeDbDataWidget *iface,
                                             GdaDataModel *model);

Sets the data model which is used by iface.

iface : an object which implements the GnomeDbDataWidget interface
model : a valid GdaDataModel