![]() |
![]() |
![]() |
V_Sim API - Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
VisuGlExtLegendVisuGlExtLegend — Draw a frame with the representation of each atom species, its name and the number of elements. |
#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
);
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.
#define VISU_GL_EXT_LEGEND_ID "Legend"
The id used to identify this extension, see
visu_gl_ext_rebuild()
for instance.
struct VisuGlExtLegendClass { VisuGlExtFrameClass parent; };
A short way to identify _VisuGlExtLegendClass structure.
VisuGlExtFrameClass |
the parent class; |
Since 3.7
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
VisuGlExtLegend * visu_gl_ext_legend_new (const gchar *name
);
Creates a new VisuGlExt to draw a legend.
|
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
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.
|
The VisuGlExtLegend to attached to. |
|
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