GdaGraphItem

GdaGraphItem — Parts of data model used with the GdaGraph object.

Synopsis

                    GdaGraphItem;
GObject*            gda_graph_item_new                  (GdaDict *dict,
                                                         GdaObject *ref_obj);
void                gda_graph_item_set_position         (GdaGraphItem *item,
                                                         gdouble x,
                                                         gdouble y);
void                gda_graph_item_get_position         (GdaGraphItem *item,
                                                         gdouble *x,
                                                         gdouble *y);
GdaObject*          gda_graph_item_get_ref_object       (GdaGraphItem *item);

Object Hierarchy

  GObject
   +----GdaObject
         +----GdaGraphItem

Implemented Interfaces

GdaGraphItem implements GdaXmlStorage.

Properties

  "ref-object"               GdaObject*            : Read / Write

Signals

  "moved"                                          : Run First

Description

Each graph item which needs to have its position kept in the GdaDict object (and written in the dictionary file) has a corresponding GdaGraphItem object. A graph item can hold a reference to any GdaObject object, meaning that the position it stores is the position where the references object's graphical representation will be on the canvas.

Details

GdaGraphItem

typedef struct _GdaGraphItem GdaGraphItem;


gda_graph_item_new ()

GObject*            gda_graph_item_new                  (GdaDict *dict,
                                                         GdaObject *ref_obj);

Creates a new GdaGraphItem object

dict :

a GdaDict object

ref_obj :

a GdaObject object which the new item will reference, or NULL.

Returns :

the newly created object

gda_graph_item_set_position ()

void                gda_graph_item_set_position         (GdaGraphItem *item,
                                                         gdouble x,
                                                         gdouble y);

Sets the position to be remembered for item.

item :

a GdaGraphItemItem object

x :

y :


gda_graph_item_get_position ()

void                gda_graph_item_get_position         (GdaGraphItem *item,
                                                         gdouble *x,
                                                         gdouble *y);

Get item's position.

item :

a GdaGraphItemItem object

x :

a place where to store the X part of the position, or NULL

y :

a place where to store the Y part of the position, or NULL

gda_graph_item_get_ref_object ()

GdaObject*          gda_graph_item_get_ref_object       (GdaGraphItem *item);

Get the referenced GdaObject object, if it exists.

item :

a GdaGraphItem object

Returns :

the referenced object, or NULL

Property Details

The "ref-object" property

  "ref-object"               GdaObject*            : Read / Write

Signal Details

The "moved" signal

void                user_function                      (GdaGraphItem *gdagraphitem,
                                                        gpointer      user_data)         : Run First

gdagraphitem :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

See Also

Se the GdaGraph object.