## GnomeDbGraphItem

GnomeDbGraphItem — Parts of data model used with the GnomeDbGraph object.

## Synopsis

                GnomeDbGraphItem;
    GType       gnome_db_graph_item_get_type    (void);
    GObject*    gnome_db_graph_item_new         (GnomeDbDict *dict,
                                                 GnomeDbBase *ref_obj);
    GnomeDbBase* gnome_db_graph_item_get_ref_object
                                                (GnomeDbGraphItem *item);
    void        gnome_db_graph_item_set_position
                                                (GnomeDbGraphItem *item,
                                                 gdouble x,
                                                 gdouble y);
    void        gnome_db_graph_item_get_position
                                                (GnomeDbGraphItem *item,
                                                 gdouble *x,
                                                 gdouble *y);

## Object Hierarchy

      GObject
       +----GnomeDbBase
             +----GnomeDbGraphItem

## Implemented Interfaces

GnomeDbGraphItem implements GnomeDbXmlStorage.

## Properties

      "ref-object"           gpointer              : Read / Write

## Signals

    "moved"     void        user_function      (GnomeDbGraphItem *dbgraphitem,
                                                gpointer user_data);

## Description

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

## Details

### GnomeDbGraphItem

    typedef struct _GnomeDbGraphItem GnomeDbGraphItem;

### gnome_db_graph_item_get_type ()

    GType       gnome_db_graph_item_get_type    (void);

Returns : |

### gnome_db_graph_item_new ()

    GObject*    gnome_db_graph_item_new         (GnomeDbDict *dict,
                                                 GnomeDbBase *ref_obj);

Creates a new GnomeDbGraphItem object

`dict` : | a GnomeDbDict object
`ref_obj` : | a GnomeDbBase object which the new item will reference, or `NULL`.
Returns : | the newly created object

### gnome_db_graph_item_get_ref_object ()

    GnomeDbBase* gnome_db_graph_item_get_ref_object
                                                (GnomeDbGraphItem *item);

Get the referenced GnomeDbBase object, if it exists.

`item` : | a GnomeDbGraphItem object
Returns : | the referenced object, or `NULL`

### gnome_db_graph_item_set_position ()

    void        gnome_db_graph_item_set_position
                                                (GnomeDbGraphItem *item,
                                                 gdouble x,
                                                 gdouble y);

Sets the position to be remembered for `item`.

`item` : | a GnomeDbGraphItemItem object
`x` : |
`y` : |

### gnome_db_graph_item_get_position ()

    void        gnome_db_graph_item_get_position
                                                (GnomeDbGraphItem *item,
                                                 gdouble *x,
                                                 gdouble *y);

Get `item`'s position.

`item` : | a GnomeDbGraphItemItem 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`

## Property Details

### The "`ref-object`" property

      "ref-object"           gpointer              : Read / Write

## Signal Details

### The "moved" signal

    void        user_function                  (GnomeDbGraphItem *dbgraphitem,
                                                gpointer user_data);

`dbgraphitem` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.

## See Also

Se the GnomeDbGraph object.