![]() |
![]() |
![]() |
GNOME Data Access 3.0 manual | ![]() |
---|---|---|---|---|
GdaGraph; enum GdaGraphType; GObject* gda_graph_new (GdaDict *dict, GdaGraphType type); GdaGraphType gda_graph_get_graph_type (GdaGraph *graph); GSList* gda_graph_get_items (GdaGraph *graph); GdaGraphItem* gda_graph_get_item_from_obj (GdaGraph *graph, GdaObject *ref_obj, gboolean create_if_needed); void gda_graph_add_item (GdaGraph *graph, GdaGraphItem *item); void gda_graph_del_item (GdaGraph *graph, GdaGraphItem *item);
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 GdaObject object using the "ref_object" property. If the referenced object is destroyed, then the graph object will also automaticallu be destroyed.
typedef enum { GDA_GRAPH_DB_RELATIONS, GDA_GRAPH_QUERY_JOINS, GDA_GRAPH_MODELLING /* for future extensions */ } GdaGraphType;
GObject* gda_graph_new (GdaDict *dict, GdaGraphType type);
Creates a new GdaGraph 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 GdaDict object |
type : |
the graph type (one of GdaGraphType) |
Returns : | the newly created object |
GdaGraphType gda_graph_get_graph_type (GdaGraph *graph);
Get the graph type of graph
.
graph : |
a GdaGraph object |
Returns : | the type |
GSList* gda_graph_get_items (GdaGraph *graph);
Get a list of GdaGraphItem objects which are items of graph
graph : |
a GdaGraph object |
Returns : | a new list of GdaGraphItem objects |
GdaGraphItem* gda_graph_get_item_from_obj (GdaGraph *graph, GdaObject *ref_obj, gboolean create_if_needed);
Get a pointer to a GdaGraphItem item from the object is represents.
If the searched GdaGraphItem is not found and create_if_needed
is TRUE, then a new
GdaGraphItem is created.
graph : |
a GdaGraph object |
ref_obj : |
the GdaObject the returned item references |
create_if_needed : |
|
Returns : | the GdaGraphItem object, or NULL if not found
|
void gda_graph_add_item (GdaGraph *graph, GdaGraphItem *item);
Adds item
to graph
.
graph : |
a GdaGraph object |
item : |
a GdaGraphItem object |
void gda_graph_del_item (GdaGraph *graph, GdaGraphItem *item);
Removes item
from graph
graph : |
a GdaGraph object |
item : |
a GdaGraphItem object |
void user_function (GdaGraph *gdagraph, GdaGraphItem *arg1, gpointer user_data) : Run First
gdagraph : |
the object which received the signal. |
arg1 : |
|
user_data : |
user data set when the signal handler was connected. |
void user_function (GdaGraph *gdagraph, GdaGraphItem *arg1, gpointer user_data) : Run First
gdagraph : |
the object which received the signal. |
arg1 : |
|
user_data : |
user data set when the signal handler was connected. |
void user_function (GdaGraph *gdagraph, GdaGraphItem *arg1, gpointer user_data) : Run First
gdagraph : |
the object which received the signal. |
arg1 : |
|
user_data : |
user data set when the signal handler was connected. |