VisuGlExtLegend

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

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── ToolDbgObj
        ╰── VisuGlExt
            ╰── VisuGlExtFrame
                ╰── VisuGlExtLegend

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.

Functions

visu_gl_ext_legend_new ()

VisuGlExtLegend *
visu_gl_ext_legend_new (const gchar *name);

Creates a new VisuGlExt to draw a legend.

Parameters

name

the name to give to the extension (default is VISU_GL_EXT_LEGEND_ID).

[allow-none]

Returns

a pointer to the VisuGlExt it created or NULL otherwise.

Since: 3.7


visu_gl_ext_legend_setNodes ()

gboolean
visu_gl_ext_legend_setNodes (VisuGlExtLegend *legend,
                             VisuNodeArrayRenderer *nodes);

Attach an VisuGlView to render to and setup the legend to get the node population also.

Parameters

legend

The VisuGlExtLegend to attached to.

 

nodes

the nodes to get the population of.

 

Returns

TRUE if model has been changed.

Since: 3.7


visu_gl_ext_legend_getNodes ()

VisuNodeArrayRenderer *
visu_gl_ext_legend_getNodes (VisuGlExtLegend *legend);

legend is displaying a label showing the element of a VisuNodeArray using the rendering properties of a VisuNodeArrayRenderer.

Parameters

legend

a VisuGlExtLegend object.

 

Returns

the VisuNodeArrayRenderer this legend is based on.

[transfer none]

Since: 3.8

Types and Values

VISU_GL_EXT_LEGEND_ID

#define VISU_GL_EXT_LEGEND_ID "Legend"

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