## extInfos extInfos — give the capability to draw some information near each node. |

## Synopsis

    VisuExtension*      initExtInfos                        (void);
    enum                VisuGlExtInfosDrawId;
    enum                VisuGlExtInfosDrawMethod;
    gboolean            visu_glExt_infos_setOn              (VisuData *data,
                                                             gboolean status);
    void                visu_glExt_infos_drawIds            (VisuData *data,
                                                             int *nodes);
    void                visu_glExt_infos_drawElements       (VisuData *data,
                                                             int *nodes);
    void                visu_glExt_infos_drawData           (VisuData *data,
                                                             VisuDataNode *dataNode,
                                                             int *nodes);
    void                visu_glExt_infos_build              (VisuData *dataObj);

## 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

### initExtInfos ()

    VisuExtension*      initExtInfos                        (void);

Create the extension, it is called by V_Sim on startup and should not used elsewhere.

Returns : | the newly created VisuExtension.

### 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_glExt_infos_setOn ()

    gboolean            visu_glExt_infos_setOn              (VisuData *data,
                                                             gboolean status);

Change the status of the informations extension.

`data` : | a VisuData object ;
`status` : | a boolean.
Returns : | TRUE if the calling routine should call `visu_object_redraw()`.

### visu_glExt_infos_drawIds ()

    void                visu_glExt_infos_drawIds            (VisuData *data,
                                                             int *nodes);

Associate a informations extension to the given `data`. 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.

`data` : | a VisuData object ;
`nodes` : | an integer list, terminated with a negative number.

### visu_glExt_infos_drawElements ()

    void                visu_glExt_infos_drawElements       (VisuData *data,
                                                             int *nodes);

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

`data` : | a VisuData object ;
`nodes` : | an integer list, terminated with a negative number.

### visu_glExt_infos_drawData ()

    void                visu_glExt_infos_drawData           (VisuData *data,
                                                             VisuDataNode *dataNode,
                                                             int *nodes);

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

`data` : | a VisuData object ;
`dataNode` : | a VisuDataNode object ;
`nodes` : | an integer list, terminated with a negative number ;

### visu_glExt_infos_build ()

    void                visu_glExt_infos_build              (VisuData *dataObj);

Build the OpenGL list representing the informations associated to the given `dataObj`. To associate some, use `visu_glExt_infos_drawIds()`, or `visu_glExt_infos_drawElements()` or `visu_glExt_infos_drawData()`.

`dataObj` : | a VisuData object.