VisuGlExtLegend

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

Synopsis

#define             VISU_GL_EXT_LEGEND_ID
struct              VisuGlExtLegend;
struct              VisuGlExtLegendClass;
VisuGlExtLegend *   visu_gl_ext_legend_getDefault       ();
VisuGlExtLegend *   visu_gl_ext_legend_new              (const gchar *name);
gboolean            visu_gl_ext_legend_setNodes         (VisuGlExtLegend *legend,
                                                         VisuNodeArray *nodes);

Object Hierarchy

  GObject
   +----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.

Details

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.


struct VisuGlExtLegend

struct VisuGlExtLegend;

An opaque structure.

Since 3.7


struct VisuGlExtLegendClass

struct VisuGlExtLegendClass {
  VisuGlExtFrameClass parent;
};

A short way to identify _VisuGlExtLegendClass structure.

VisuGlExtFrameClass parent;

the parent class;

Since 3.7


visu_gl_ext_legend_getDefault ()

VisuGlExtLegend *   visu_gl_ext_legend_getDefault       ();

V_Sim is using a default legend object.

Returns :

a VisuGlExtLegend object used by default. [transfer none]

Since 3.7


visu_gl_ext_legend_new ()

VisuGlExtLegend *   visu_gl_ext_legend_new              (const gchar *name);

Creates a new VisuGlExt to draw a legend.

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,
                                                         VisuNodeArray *nodes);

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

legend :

The VisuGlExtLegend to attached to.

nodes :

the nodes to get the population of.

Returns :

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

Since 3.7