VisuGlExtInfos

VisuGlExtInfos — give the capability to draw some information near each node.

Synopsis

#define             VISU_GL_EXT_INFOS_ID
struct              VisuGlExtInfos;
struct              VisuGlExtInfosClass;
enum                VisuGlExtInfosDrawId;
enum                VisuGlExtInfosDrawMethod;
void                visu_gl_ext_infos_draw              (VisuGlExtInfos *infos);
gboolean            visu_gl_ext_infos_drawData          (VisuGlExtInfos *infos,
                                                         VisuDataNode *dataNode,
                                                         int *nodes);
gboolean            visu_gl_ext_infos_drawElements      (VisuGlExtInfos *infos,
                                                         int *nodes);
gboolean            visu_gl_ext_infos_drawIds           (VisuGlExtInfos *infos,
                                                         int *nodes);
VisuGlExtInfos *    visu_gl_ext_infos_getDefault        ();
VisuGlExtInfos *    visu_gl_ext_infos_new               (const gchar *name);
gboolean            visu_gl_ext_infos_setData           (VisuGlExtInfos *infos,
                                                         VisuData *data);
gboolean            visu_gl_ext_infos_setGlView         (VisuGlExtInfos *infos,
                                                         VisuGlView *view);

Object Hierarchy

  GObject
   +----VisuGlExt
         +----VisuGlExtInfos

Description

This part is used to draw some information near the nodes. This information can be the one of a VisuNodeProperty or something else. When read from a VisuNodeProperty, just giving the name will produce the right output. In other cases a print routine must be given.

Details

VISU_GL_EXT_INFOS_ID

#define VISU_GL_EXT_INFOS_ID "Node information"

The id used to identify this extension, see visu_gl_ext_rebuild() for instance.


struct VisuGlExtInfos

struct VisuGlExtInfos;

An opaque structure.

Since 3.7


struct VisuGlExtInfosClass

struct VisuGlExtInfosClass {
  VisuGlExtClass parent;
};

A short way to identify _VisuGlExtInfosClass structure.

VisuGlExtClass parent;

the parent class;

Since 3.7


enum VisuGlExtInfosDrawId

typedef enum {
    DRAW_NEVER,
    DRAW_SELECTED,
    DRAW_ALWAYS
} VisuGlExtInfosDrawId;

This enum represents the possibilities for the information drawing.

DRAW_NEVER

don't draw any information on nodes ;

DRAW_SELECTED

draw information only on a list of nodes ;

DRAW_ALWAYS

draw information on all nodes.

enum VisuGlExtInfosDrawMethod

typedef enum {
    EXT_DRAW_METH_NONE,
    EXT_DRAW_METH_ID,
    EXT_DRAW_METH_TYPE,
    EXT_DRAW_METH_OTHER
} VisuGlExtInfosDrawMethod;

This enum represents the method for information drawing.

EXT_DRAW_METH_NONE

draw nothing ;

EXT_DRAW_METH_ID

draw the id of nodes ;

EXT_DRAW_METH_TYPE

draw the name of node element ;

EXT_DRAW_METH_OTHER

other possible draw rendering method.

visu_gl_ext_infos_draw ()

void                visu_gl_ext_infos_draw              (VisuGlExtInfos *infos);

Compile the list representing information displayed on nodes.

infos :

a VisuGlExtInfos object.

Since 3.7


visu_gl_ext_infos_drawData ()

gboolean            visu_gl_ext_infos_drawData          (VisuGlExtInfos *infos,
                                                         VisuDataNode *dataNode,
                                                         int *nodes);

As visu_gl_ext_infos_drawIds(), but draw some informations instead of their numbers. The informations are defined by the dataNode argument.

infos :

the VisuGlExtInfos object to update.

dataNode :

a VisuDataNode object ;

nodes :

an integer list, terminated with a negative number. [array zero-terminated=1][transfer full]

Returns :

TRUE if a call to visu_gl_ext_infos_draw() is needed.

visu_gl_ext_infos_drawElements ()

gboolean            visu_gl_ext_infos_drawElements      (VisuGlExtInfos *infos,
                                                         int *nodes);

As visu_gl_ext_infos_drawIds(), but draw the names of elements instead of their numbers.

infos :

the VisuGlExtInfos object to update.

nodes :

an integer list, terminated with a negative number. [array zero-terminated=1][transfer full]

Returns :

TRUE if a call to visu_gl_ext_infos_draw() is needed.

visu_gl_ext_infos_drawIds ()

gboolean            visu_gl_ext_infos_drawIds           (VisuGlExtInfos *infos,
                                                         int *nodes);

With this extension, some the number of nodes will be drawn on them. Numbers can be drawn and all nodes (set nodes to a NULL pointer), or to a restricted list of nodes represented by their numbers. In this case, nodes can have whatever length but must be terminated by a negative integer. This array is then owned by the extension and should not be freed.

infos :

the VisuGlExtInfos object to update.

nodes :

an integer list, terminated with a negative number. [array zero-terminated=1][transfer full]

Returns :

TRUE if a call to visu_gl_ext_infos_draw() is needed.

visu_gl_ext_infos_getDefault ()

VisuGlExtInfos *    visu_gl_ext_infos_getDefault        ();

V_Sim is using a default infos object.

Returns :

a VisuGlExtInfos object used by default. [transfer none]

Since 3.7


visu_gl_ext_infos_new ()

VisuGlExtInfos *    visu_gl_ext_infos_new               (const gchar *name);

Create a new VisuGlExt to represent information on nodes.

name :

the name of the VisuGlExt. [allow-none]

Returns :

a new VisuGlExtInfos object.

Since 3.7


visu_gl_ext_infos_setData ()

gboolean            visu_gl_ext_infos_setData           (VisuGlExtInfos *infos,
                                                         VisuData *data);

Attach an VisuData to render to and setup the infos.

infos :

The VisuGlExtInfos to attached to.

data :

the nodes to get the population of.

Returns :

TRUE if visu_gl_ext_infos_draw() should be called and then 'OpenGLAskForReDraw' signal be emitted.

Since 3.7


visu_gl_ext_infos_setGlView ()

gboolean            visu_gl_ext_infos_setGlView         (VisuGlExtInfos *infos,
                                                         VisuGlView *view);

Attach an VisuGlView to render to and setup the infos.

infos :

The VisuGlExtInfos to attached to.

view :

the nodes to get the population of.

Returns :

TRUE if visu_gl_ext_infos_draw() should be called and then 'OpenGLAskForReDraw' signal be emitted.

Since 3.7