![]() |
![]() |
![]() |
Libgnomedb Reference Manual | ![]() |
---|
GnomeDbSelectorGnomeDbSelector — Individual selection of libgnomedb objects (data types, functions, ...) |
GnomeDbSelector; enum GnomeDbSelectorMode; enum GnomeDbSelectorColumn; GtkWidget* gnome_db_selector_new (GdaDict *dict, GObject *ref_object, gulong mode, gulong columns); void gnome_db_selector_set_mode_columns (GnomeDbSelector *mgsel, GObject *ref_object, gulong mode, gulong columns); gboolean gnome_db_selector_set_selected_object (GnomeDbSelector *mgsel, GObject *selection); void gnome_db_selector_set_headers_visible (GnomeDbSelector *mgsel, gboolean visible); void gnome_db_selector_set_column_label (GnomeDbSelector *mgsel, guint column, const gchar *label); void gnome_db_selector_expand_all (GnomeDbSelector *mgsel); void gnome_db_selector_collapse_all (GnomeDbSelector *mgsel); GObject* gnome_db_selector_get_selected_object (GnomeDbSelector *mgsel); GObject* gnome_db_selector_get_selected_object_parent (GnomeDbSelector *mgsel); void name_group_init_model_fill (Module *module, GtkTreeModel *model); void name_group_manager_destroyed_cb (GObject *manager_obj, Module *module); void name_group_manager_weak_notify (Module *module, GObject *manager_obj); void name_group_obj_added_cb (GObject *manager_obj, GObject *added_obj, Module *module); void name_group_obj_removed_cb (GObject *manager_obj, GObject *removed_obj, Module *module); void name_group_obj_updated_cb (GObject *manager_obj, GObject *upd_obj, Module *module); void name_group_update_started_cb (GObject *manager_obj, Module *module); void name_group_update_finished_cb (GObject *manager_obj, Module *module); void name_group_do_add_obj (Module *module, GObject *added_obj); void name_group_do_remove_obj (Module *module, GObject *removed_obj); void name_group_do_update_obj (Module *module, GObject *updated_obj); void name_group_free_mod_data (Module *module); void flat_init_model_fill (Module *module, GtkTreeModel *model); void flat_manager_weak_notify (Module *module, GObject *manager_obj); void flat_obj_added_cb (GObject *manager_obj, GObject *added_obj, Module *module); void flat_obj_removed_cb (GObject *manager_obj, GObject *removed_obj, Module *module); void flat_obj_updated_cb (GObject *manager_obj, GObject *upd_obj, Module *module); void flat_objs_order_changed_cb (GObject *manager_obj, Module *module); void flat_do_add_obj (Module *module, GObject *added_obj); void flat_do_remove_obj (Module *module, GObject *removed_obj); void flat_do_update_obj (Module *module, GObject *updated_obj); void flat_free_mod_data (Module *module);
GObject +----GtkObject +----GtkWidget +----GtkContainer +----GtkBox +----GtkVBox +----GnomeDbSelector
"selection-changed" void user_function (GnomeDbSelector *dbselector, GObject *arg1, gpointer user_data);
This widget presents the user with a (configurable) list of objects to choose from: Data types, functions, aggregates, ...
What really gets displayed in the widget (columns and rows) depends on the parameters passed to the gnome_db_selector_new()
function.
typedef enum { GNOME_DB_SELECTOR_DATA_TYPES = 1 << 0, GNOME_DB_SELECTOR_FUNCTIONS = 1 << 1, GNOME_DB_SELECTOR_AGGREGATES = 1 << 2, /* database structure */ GNOME_DB_SELECTOR_TABLES = 1 << 3, GNOME_DB_SELECTOR_FIELDS = 1 << 5, /* queries */ GNOME_DB_SELECTOR_QUERIES = 1 << 4, GNOME_DB_SELECTOR_TARGETS = 1 << 6, GNOME_DB_SELECTOR_JOINS = 1 << 7, GNOME_DB_SELECTOR_QVIS_FIELDS = 1 << 8, GNOME_DB_SELECTOR_QALL_FIELDS = 1 << 9, GNOME_DB_SELECTOR_SUB_QUERIES = 1 << 10, GNOME_DB_SELECTOR_TARGETS_CTS = 1 << 13, /* graphs */ GNOME_DB_SELECTOR_GRAPHS = 1 << 11, /* layouts */ GNOME_DB_SELECTOR_FORMS = 1 << 12 } GnomeDbSelectorMode;
typedef enum { GNOME_DB_SELECTOR_COLUMN_OWNER = 1 << 1, GNOME_DB_SELECTOR_COLUMN_COMMENTS = 1 << 2, GNOME_DB_SELECTOR_COLUMN_TYPE = 1 << 3, GNOME_DB_SELECTOR_COLUMN_FIELD_LENGTH = 1 << 4, GNOME_DB_SELECTOR_COLUMN_FIELD_NNUL = 1 << 5, GNOME_DB_SELECTOR_COLUMN_FIELD_DEFAULT= 1 << 6, GNOME_DB_SELECTOR_COLUMN_QFIELD_VALUE = 1 << 7, GNOME_DB_SELECTOR_COLUMN_QFIELD_TYPE = 1 << 8 } GnomeDbSelectorColumn;
GtkWidget* gnome_db_selector_new (GdaDict *dict, GObject *ref_object, gulong mode, gulong columns);
Creates a new GnomeDbSelector widget.
ref_object
must be NULL
if mode
implies a list where the displayed items
are all fetched from within dict
(namely GNOME_DB_SELECTOR_DATA_TYPES, GNOME_DB_SELECTOR_FUNCTIONS,
GNOME_DB_SELECTOR_AGGREGATES, GNOME_DB_SELECTOR_TABLES, GNOME_DB_SELECTOR_QUERIES). In this case ref_object
will simply be ignored.
ref_object
cannot be NULL
if mode
implies a list where the displayed items depend
on a specific object, namely GNOME_DB_SELECTOR_FIELDS (when not used in conjunction with GNOME_DB_SELECTOR_TABLES),
GNOME_DB_SELECTOR_TARGETS, GNOME_DB_SELECTOR_JOINS, GNOME_DB_SELECTOR_QVIS_FIELDS, GNOME_DB_SELECTOR_QALL_FIELDS and
GNOME_DB_SELECTOR_SUB_QUERIES (when not used in conjunction with GNOME_DB_SELECTOR_QUERIES).
dict : |
a GdaDict object |
ref_object : |
a GObject object, or NULL if none is required
|
mode : |
an OR'ed value of the possible items to display in the widget |
columns : |
an OR'ed value describing which columns will be displayed |
Returns : | the new widget |
void gnome_db_selector_set_mode_columns (GnomeDbSelector *mgsel, GObject *ref_object, gulong mode, gulong columns);
Changes what data gets displayed in mgsel
and which columns are displayed.
The mode
and columns
have the same meaning as for the gnome_db_selector_new()
function.
The usage of the ref_object
parameter is the same as for gnome_db_selector_new()
.
mgsel : |
a GnomeDbSelector widget |
ref_object : |
a GObject, or NULL
|
mode : |
an OR'ed value of the possible items to display in the widget |
columns : |
an OR'ed value describing which columns will be displayed |
gboolean gnome_db_selector_set_selected_object (GnomeDbSelector *mgsel, GObject *selection);
Force the widget to select a given object, and to display it in its visible area (unfolding nodes on the way if necessary)
mgsel : |
|
selection : |
|
Returns : | TRUE if the specified object was found, and FALSE otherwise |
void gnome_db_selector_set_headers_visible (GnomeDbSelector *mgsel, gboolean visible);
Show or hide the headers.
mgsel : |
|
visible : |
void gnome_db_selector_set_column_label (GnomeDbSelector *mgsel, guint column, const gchar *label);
Sets the label of a column's header.
mgsel : |
|
column : |
|
label : |
void gnome_db_selector_expand_all (GnomeDbSelector *mgsel);
Recursively expands all nodes in the mgsel
widget.
mgsel : |
void gnome_db_selector_collapse_all (GnomeDbSelector *mgsel);
Recursively collapse all nodes in the mgsel
widget.
mgsel : |
GObject* gnome_db_selector_get_selected_object (GnomeDbSelector *mgsel);
Get the currently selected object.
mgsel : |
|
Returns : | the selected object or NULL if nothing is selected or the current selection is on a "category" of objects (such as the "Functions" category for example). |
GObject* gnome_db_selector_get_selected_object_parent (GnomeDbSelector *mgsel);
FIXME
mgsel : |
|
Returns : |
void name_group_init_model_fill (Module *module, GtkTreeModel *model);
module : |
|
model : |
void name_group_manager_destroyed_cb (GObject *manager_obj, Module *module);
manager_obj : |
|
module : |
void name_group_manager_weak_notify (Module *module, GObject *manager_obj);
module : |
|
manager_obj : |
void name_group_obj_added_cb (GObject *manager_obj, GObject *added_obj, Module *module);
manager_obj : |
|
added_obj : |
|
module : |
void name_group_obj_removed_cb (GObject *manager_obj, GObject *removed_obj, Module *module);
manager_obj : |
|
removed_obj : |
|
module : |
void name_group_obj_updated_cb (GObject *manager_obj, GObject *upd_obj, Module *module);
manager_obj : |
|
upd_obj : |
|
module : |
void name_group_update_started_cb (GObject *manager_obj, Module *module);
manager_obj : |
|
module : |
void name_group_update_finished_cb (GObject *manager_obj, Module *module);
manager_obj : |
|
module : |
void name_group_do_add_obj (Module *module, GObject *added_obj);
module : |
|
added_obj : |
void name_group_do_remove_obj (Module *module, GObject *removed_obj);
module : |
|
removed_obj : |
void name_group_do_update_obj (Module *module, GObject *updated_obj);
module : |
|
updated_obj : |
void flat_init_model_fill (Module *module, GtkTreeModel *model);
module : |
|
model : |
void flat_manager_weak_notify (Module *module, GObject *manager_obj);
module : |
|
manager_obj : |
void flat_obj_added_cb (GObject *manager_obj, GObject *added_obj, Module *module);
manager_obj : |
|
added_obj : |
|
module : |
void flat_obj_removed_cb (GObject *manager_obj, GObject *removed_obj, Module *module);
manager_obj : |
|
removed_obj : |
|
module : |
void flat_obj_updated_cb (GObject *manager_obj, GObject *upd_obj, Module *module);
manager_obj : |
|
upd_obj : |
|
module : |
void flat_objs_order_changed_cb (GObject *manager_obj, Module *module);
manager_obj : |
|
module : |
void flat_do_remove_obj (Module *module, GObject *removed_obj);
module : |
|
removed_obj : |
void flat_do_update_obj (Module *module, GObject *updated_obj);
module : |
|
updated_obj : |
void user_function (GnomeDbSelector *dbselector, GObject *arg1, gpointer user_data);
dbselector : |
the object which received the signal. |
arg1 : |
|
user_data : |
user data set when the signal handler was connected. |
<< General purpose widgets | GnomeDbmsUpdateViewer >> |