![]() |
![]() |
![]() |
GNOME Data Access 4 manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Prerequisites | Known Implementations | Signals |
GdauiDataWidget; GdauiDataWidgetIface; GdaDataProxy * gdaui_data_widget_get_proxy (GdauiDataWidget *iface); GtkActionGroup * gdaui_data_widget_get_actions_group (GdauiDataWidget *iface); void gdaui_data_widget_perform_action (GdauiDataWidget *iface, GdauiAction action); void gdaui_data_widget_column_show (GdauiDataWidget *iface, gint column); void gdaui_data_widget_column_hide (GdauiDataWidget *iface, gint column); void gdaui_data_widget_column_set_editable (GdauiDataWidget *iface, gint column, gboolean editable); void gdaui_data_widget_column_show_actions (GdauiDataWidget *iface, gint column, gboolean show_actions); GdaDataModel * gdaui_data_widget_get_gda_model (GdauiDataWidget *iface); void gdaui_data_widget_set_gda_model (GdauiDataWidget *iface, GdaDataModel *model); GdaDataModelIter * gdaui_data_widget_get_current_data (GdauiDataWidget *iface); enum GdauiDataWidgetWriteMode; gboolean gdaui_data_widget_set_write_mode (GdauiDataWidget *iface, GdauiDataWidgetWriteMode mode); GdauiDataWidgetWriteMode gdaui_data_widget_get_write_mode (GdauiDataWidget *iface); void gdaui_data_widget_set_data_layout_from_file (GdauiDataWidget *iface, const gchar *file_name, const gchar *parent_table);
typedef struct { GTypeInterface g_iface; /* virtual table */ GdaDataProxy *(* get_proxy) (GdauiDataWidget *iface); void (* col_set_show) (GdauiDataWidget *iface, gint column, gboolean shown); void (* set_column_editable) (GdauiDataWidget *iface, gint column, gboolean editable); void (* show_column_actions) (GdauiDataWidget *iface, gint column, gboolean show_actions); GtkActionGroup *(* get_actions_group) (GdauiDataWidget *iface); GdaDataModelIter *(* get_data_set) (GdauiDataWidget *iface); GdaDataModel *(* get_gda_model) (GdauiDataWidget *iface); void (* set_gda_model) (GdauiDataWidget *iface, GdaDataModel *model); gboolean (* set_write_mode) (GdauiDataWidget *iface, GdauiDataWidgetWriteMode mode); GdauiDataWidgetWriteMode (* get_write_mode)(GdauiDataWidget *iface); void (* set_data_layout) (GdauiDataWidget *iface, const gpointer data); /* signals */ void (* proxy_changed) (GdauiDataWidget *iface, GdaDataProxy *proxy); void (* iter_changed) (GdauiDataWidget *iface, GdaDataModelIter *iter); } GdauiDataWidgetIface;
GdaDataProxy * gdaui_data_widget_get_proxy (GdauiDataWidget *iface);
Get a pointer to the GdaDataProxy being used by iface
|
an object which implements the GdauiDataWidget interface |
Returns : |
a GdaDataProxy pointer |
GtkActionGroup * gdaui_data_widget_get_actions_group (GdauiDataWidget *iface);
Each widget imlplementing the GdauiDataWidget interface provides actions. Actions can be triggered
using the gdaui_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".
Filtering: "ActionFilter"
|
an object which implements the GdauiDataWidget interface |
Returns : |
the GtkActionGroup with all the possible actions on the widget. |
void gdaui_data_widget_perform_action (GdauiDataWidget *iface, GdauiAction 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.
|
an object which implements the GdauiDataWidget interface |
|
a GdauiAction action |
void gdaui_data_widget_column_show (GdauiDataWidget *iface, gint column);
Shows the data at column
in the data model iface
operates on
|
an object which implements the GdauiDataWidget interface |
|
column number to show |
void gdaui_data_widget_column_hide (GdauiDataWidget *iface, gint column);
Hides the data at column
in the data model iface
operates on
|
an object which implements the GdauiDataWidget interface |
|
column number to hide |
void gdaui_data_widget_column_set_editable (GdauiDataWidget *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.
|
an object which implements the GdauiDataWidget interface |
|
column number of the data |
|
void gdaui_data_widget_column_show_actions (GdauiDataWidget *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.
|
an object which implements the GdauiDataWidget interface |
|
column number of the data, or -1 to apply the setting to all the columns |
|
GdaDataModel * gdaui_data_widget_get_gda_model (GdauiDataWidget *iface);
Get the current GdaDataModel used by iface
|
an object which implements the GdauiDataWidget interface |
Returns : |
the GdaDataModel, or NULL if there is none
|
void gdaui_data_widget_set_gda_model (GdauiDataWidget *iface, GdaDataModel *model);
Sets the data model which is used by iface
.
|
an object which implements the GdauiDataWidget interface |
|
a valid GdaDataModel |
GdaDataModelIter * gdaui_data_widget_get_current_data (GdauiDataWidget *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.
|
an object which implements the GdauiDataWidget interface |
Returns : |
the GdaSet object for data (not a new object) |
typedef enum { GDAUI_DATA_WIDGET_WRITE_ON_DEMAND = 0, /* write only when explicitly requested */ GDAUI_DATA_WIDGET_WRITE_ON_ROW_CHANGE = 1, /* write when the current selected row changes */ GDAUI_DATA_WIDGET_WRITE_ON_VALUE_ACTIVATED = 2, /* write when user activates a value change */ GDAUI_DATA_WIDGET_WRITE_ON_VALUE_CHANGE = 3 /* write when a parameters's value changes */ } GdauiDataWidgetWriteMode;
gboolean gdaui_data_widget_set_write_mode (GdauiDataWidget *iface, GdauiDataWidgetWriteMode mode);
Specifies the way the modifications stored in the GdaDataProxy used internally by iface
are written back to
the GdaDataModel which holds the data displayed in iface
.
|
an object which implements the GdauiDataWidget interface |
|
|
Returns : |
TRUE if the proposed mode has been taken into account |
GdauiDataWidgetWriteMode gdaui_data_widget_get_write_mode (GdauiDataWidget *iface);
Get the way the modifications stored in the GdaDataProxy used internally by iface
are written back to
the GdaDataModel which holds the data displayed in iface
.
|
an object which implements the GdauiDataWidget interface |
Returns : |
the write mode used by iface
|
void gdaui_data_widget_set_data_layout_from_file (GdauiDataWidget *iface, const gchar *file_name, const gchar *parent_table);
Sets a data layout according an XML string in the iface
widget.
|
an object which implements the GdauiDataWidget interface |
|
|
|
"iter-changed"
signalvoid user_function (GdauiDataWidget *gdauidatawidget, gpointer arg1, gpointer user_data) : Run First
|
the object which received the signal. |
|
|
|
user data set when the signal handler was connected. |
"proxy-changed"
signalvoid user_function (GdauiDataWidget *gdauidatawidget, GdaDataProxy *arg1, gpointer user_data) : Run First
|
the object which received the signal. |
|
|
|
user data set when the signal handler was connected. |