GogObject

GogObject — The base class for graph objects.

Functions

Properties

gchar * alignment Read / Write
gchar * anchor Read / Write
gchar * compass Read / Write
guint id Read / Write
gboolean invisible Read / Write
gboolean is-position-manual Read / Write
gchar * manual-size Read / Write
gchar * position Read / Write

Signals

Types and Values

Object Hierarchy

    GBoxed
    ╰── GogObjectRole
    GObject
    ╰── GogObject
        ├── Gog3DBox
        ├── GogStyledObject
        ╰── GogPlot

Description

Abstract base class that objects in the graph hierarchy are based on. This class handles manipulation of the object hierarchy, and positioning of objects in the graph.

Every object has a name that is unique in the graph. It can have a parent and a list of children in specific roles (see GogObjectRole). There can generally be several children in each role.

If built with GTK+ support, each object also knows how to populate a widget that allows one to manipulate the attributes of that object. This can be used by GOEditor to present a widget that allows manipulation of the whole graph.

Functions

GogDataDuplicator ()

void
(*GogDataDuplicator) (GogDataset const *src,
                      GogDataset *dst);

gog_object_add_by_name ()

GogObject *
gog_object_add_by_name (GogObject *parent,
                        char const *role,
                        GogObject *child);

Parameters

parent

GogObject

 

child

optionally null GogObject.

[transfer full][allow-none]

Returns

a newly created child of parent in role . If child is provided, it is assumed to be an unaffiliated object that will be assigned in role . On failure return NULL.

[transfer none]


gog_object_add_by_role ()

GogObject *
gog_object_add_by_role (GogObject *parent,
                        GogObjectRole const *role,
                        GogObject *child);

Absorb a ref to child if it is non-NULL.

Parameters

parent

GogObject

 

role

GogObjectRole

 

child

GogObject.

[transfer full][allow-none]

Returns

child or a newly created object with role .

[transfer none]


gog_object_can_reorder ()

void
gog_object_can_reorder (GogObject const *obj,
                        gboolean *inc_ok,
                        gboolean *dec_ok);

If obj can move forward or backward in its parents child list

Parameters

obj

GogObject

 

inc_ok

optionally NULL pointer for result.

 

dec_ok

optionally NULL pointer for result.

 

gog_object_clear_parent ()

gboolean
gog_object_clear_parent (GogObject *obj);

Does _not_ unref the child, which in effect adds a ref by freeing up the ref previously associated with the parent.

Parameters

obj

GogObject

 

Returns

TRUE on success.


gog_object_document_changed ()

void
gog_object_document_changed (GogObject *obj,
                             GODoc *doc);

gog_object_dup ()

GogObject *
gog_object_dup (GogObject const *src,
                GogObject *new_parent,
                GogDataDuplicator datadup);

Create a deep copy of obj using new_parent as its parent.

Parameters

src

GogObject

 

new_parent

GogObject the parent tree for the object (can be NULL)

 

datadup

a function to duplicate the data (a default one is used if NULL).

[scope call]

Returns

the duplicated object.

[transfer full]


gog_object_emit_changed ()

void
gog_object_emit_changed (GogObject *obj,
                         gboolean size);

gog_object_find_role_by_name ()

GogObjectRole const *
gog_object_find_role_by_name (GogObject const *obj,
                              char const *role);

gog_object_get_child_by_name ()

GogObject *
gog_object_get_child_by_name (GogObject const *obj,
                              char const *name);

A convenience routine to find a unique child with role == name

Parameters

obj

a GogObject

 

name

a char to use as a role name filter

 

Returns

NULL and spews an error if there is more than one.

[transfer none]


gog_object_get_child_by_role ()

GogObject *
gog_object_get_child_by_role (GogObject const *obj,
                              GogObjectRole const *role);

A convenience routine to find a unique child with role .

Parameters

obj

a GogObject

 

role

a GogObjectRole to use as a filter

 

Returns

NULL and spews an error if there is more than one.

[tr