![]() |
![]() |
![]() |
Libgnomedb Reference Manual | ![]() |
---|---|---|---|---|
GnomeDbGraph; GType gnome_db_graph_get_type (void); GObject* gnome_db_graph_new (GnomeDbDict *dict, GnomeDbGraphType type); GnomeDbGraphType gnome_db_graph_get_graph_type (GnomeDbGraph *graph); void gnome_db_graph_add_item (GnomeDbGraph *graph, GnomeDbGraphItem *item); void gnome_db_graph_del_item (GnomeDbGraph *graph, GnomeDbGraphItem *item); GnomeDbGraphItem* gnome_db_graph_get_item_from_obj (GnomeDbGraph *graph, GnomeDbBase *ref_obj, gboolean create_if_needed); GSList* gnome_db_graph_get_items (GnomeDbGraph *graph);
"item-added" void user_function (GnomeDbGraph *dbgraph, gpointer arg1, gpointer user_data) : Run first "item-dropped" void user_function (GnomeDbGraph *dbgraph, gpointer arg1, gpointer user_data) : Run first "item-moved" void user_function (GnomeDbGraph *dbgraph, gpointer arg1, gpointer user_data) : Run first
An instance of this object is required for each unique graph that is to be created. It is the "model" part of the graph. The "view" and "controler" parts are brought by the GnomeDbCanvas and associated widgets.
The graph can be "attached" to a specific GnomeDbBase object using the "ref_object" property. If the referenced object is destroyed, then the graph object will also automaticallu be destroyed.
GObject* gnome_db_graph_new (GnomeDbDict *dict, GnomeDbGraphType type);
Creates a new GnomeDbGraph object. The graph type is used only to be able to sort out the different types of graphs. It brings no special functionnality.
dict : |
a GnomeDbDict object |
type : |
the graph type (one of GnomeDbGraphType) |
Returns : | the newly created object |
GnomeDbGraphType gnome_db_graph_get_graph_type (GnomeDbGraph *graph);
Get the graph type of graph
.
graph : |
a GnomeDbGraph object |
Returns : | the type |
void gnome_db_graph_add_item (GnomeDbGraph *graph, GnomeDbGraphItem *item);
Adds item
to graph
.
graph : |
a GnomeDbGraph object |
item : |
a GnomeDbGraphItem object |
void gnome_db_graph_del_item (GnomeDbGraph *graph, GnomeDbGraphItem *item);
Removes item
from graph
graph : |
a GnomeDbGraph object |
item : |
a GnomeDbGraphItem object |
GnomeDbGraphItem* gnome_db_graph_get_item_from_obj (GnomeDbGraph *graph, GnomeDbBase *ref_obj, gboolean create_if_needed);
Get a pointer to a GnomeDbGraphItem item from the object is represents.
If the searched GnomeDbGraphItem is not found and create_if_needed
is TRUE, then a new
GnomeDbGraphItem is created.
graph : |
a GnomeDbGraph object |
ref_obj : |
the GnomeDbBase the returned item references |
create_if_needed : |
|
Returns : | the GnomeDbGraphItem object, or NULL if not found
|
GSList* gnome_db_graph_get_items (GnomeDbGraph *graph);
Get a list of GnomeDbGraphItem objects which are items of graph
graph : |
a GnomeDbGraph object |
Returns : | a new list of GnomeDbGraphItem objects |
void user_function (GnomeDbGraph *dbgraph, gpointer arg1, gpointer user_data) : Run first
dbgraph : |
the object which received the signal. |
arg1 : |
|
user_data : |
user data set when the signal handler was connected. |
void user_function (GnomeDbGraph *dbgraph, gpointer arg1, gpointer user_data) : Run first
dbgraph : |
the object which received the signal. |
arg1 : |
|
user_data : |
user data set when the signal handler was connected. |
void user_function (GnomeDbGraph *dbgraph, gpointer arg1, gpointer user_data) : Run first
dbgraph : |
the object which received the signal. |
arg1 : |
|
user_data : |
user data set when the signal handler was connected. |