## legend

legend — Draw a frame with the representation of each atom species, its name and the number of elements.

## Synopsis

    #define             VISU_GLEXT_LEGEND_ID
    VisuExtension*      initExtLegend                       ();
    gboolean            visu_glExt_legend_setOn             (gboolean value);
    gboolean            visu_glExt_legend_getOn             ();
    void                visu_glExt_legend_draw              (VisuData *dataObj);

## Description

This extension draws a frame on top of the rendering area with an item per VisuElement currently rendered. For each VisuElement, a small representation of its OpenGL shape is drawn, its label is printed and the number of VisuNode associated to this element.

This extension defines one resource entry labeled "legend_is_on" to control if the legend is printed or not.

## Details

### VISU_GLEXT_LEGEND_ID

    #define VISU_GLEXT_LEGEND_ID "Legend"

The id of the legend extension.

### initExtLegend ()

    VisuExtension*      initExtLegend                       ();

Internal use only.

Returns : | the newly created legend extension.

Since 3.5

### visu_glExt_legend_setOn ()

    gboolean            visu_glExt_legend_setOn             (gboolean value);

Set or not the status of the legend extension.

`value` : | a boolean.
Returns : | TRUE if the status is changed.

Since 3.5

### visu_glExt_legend_getOn ()

    gboolean            visu_glExt_legend_getOn             ();

Legend extension draw a frame with the name and the number of elements of the current rendered data.

Returns : | TRUE if the legend is used.

Since 3.5

### visu_glExt_legend_draw ()

    void                visu_glExt_legend_draw              (VisuData *dataObj);

Draw the legend corresponding to the given `dataObj`.

`dataObj` : | a VisuData object.

Since 3.5