| V_Sim API - Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Signals | ||||
VisuGlExtMarks; VisuGlExtMarksClass; enum VisuGlExtMarksStatus; gboolean visu_gl_ext_marks_exportXMLFile (VisuGlExtMarks *marks,const gchar *filename,int *nodes,VisuGlExtInfosDrawId drawingMode,guint drawingInfos,GError **error); gboolean visu_gl_ext_marks_getActive (VisuGlExtMarks *marks,guint nodeId); gboolean visu_gl_ext_marks_getHighlightStatus (VisuGlExtMarks *marks,guint nodeId); GList * visu_gl_ext_marks_getHighlightedList (VisuGlExtMarks *marks); VisuGlExt * visu_gl_ext_marks_getInternalList (VisuGlExtMarks *marks); gchar * visu_gl_ext_marks_getMeasurementLabels (VisuGlExtMarks *marks); gchar * visu_gl_ext_marks_getMeasurementStrings (VisuGlExtMarks *marks,VisuData *dataObj); VisuGlExtMarks * visu_gl_ext_marks_new (const gchar *name); gboolean visu_gl_ext_marks_parseXMLFile (VisuGlExtMarks *marks,const gchar *filename,GList **infos,VisuGlExtInfosDrawId *drawingMode,guint *drawingInfos,GError **error); gboolean visu_gl_ext_marks_removeMeasures (VisuGlExtMarks *marks,gint nodeId); void visu_gl_ext_marks_setData (VisuGlExtMarks *marks,VisuData *data); gboolean visu_gl_ext_marks_setDrawValues (VisuGlExtMarks *marks,gboolean status); void visu_gl_ext_marks_setGlView (VisuGlExtMarks *marks,VisuGlView *view); gboolean visu_gl_ext_marks_setHighlightedList (VisuGlExtMarks *marks,GList *lst,VisuGlExtMarksStatus status); gboolean visu_gl_ext_marks_setInfos (VisuGlExtMarks *marks,guint nodeId,gboolean status); void visu_gl_ext_marks_setInteractive (VisuGlExtMarks *marks,VisuInteractive *inter);
VisuGlExtMarks is used to store a set of mark on a list of
nodes. A mark can be a distance measurement, an angle measurement
or an highlight. The measurement marks are automatically updated by
listening to the "node-selection" signal. On the
contrary, highlights are set, unset or toggled using
visu_gl_ext_marks_setHighlightedList().
In addition, VisuGlExtMarks can be export to or loaded from an
XML file thanks to visu_gl_ext_marks_exportXMLFile() and visu_gl_ext_marks_parseXMLFile().
typedef struct _VisuGlExtMarksClass VisuGlExtMarksClass;
An opaque structure defining the class of a VisuGlExtMarks objects.
Since 3.6
typedef enum {
MARKS_STATUS_KEEP,
MARKS_STATUS_TOGGLE,
MARKS_STATUS_SET,
MARKS_STATUS_UNSET
} VisuGlExtMarksStatus;
Possible parameters to change mark status, see
visu_gl_ext_marks_setHighlightedList() for instance.
| do not change the status of the mark ; | |
| change the status of the mark ; | |
| set the mark on ; | |
| unset a mark. |
Since 3.6
gboolean visu_gl_ext_marks_exportXMLFile (VisuGlExtMarks *marks,const gchar *filename,int *nodes,VisuGlExtInfosDrawId drawingMode,guint drawingInfos,GError **error);
This routines export to an XML file a description of selected
nodes. If nodes is NULL, the nodes stored in the mark will be
used instead.
|
a VisuGlExtMarks object. |
|
a location to save to. |
|
an array of nodes, -1 terminated (can be NULL). |
|
a flag. |
|
a flag. |
|
a location to store an error. |
Returns : |
TRUE if no error. |
Since 3.5
gboolean visu_gl_ext_marks_getActive (VisuGlExtMarks *marks,guint nodeId);
Retrieve if nodeId is implied any measurement marks stored in mark.
|
a VisuGlExtMarks object. |
|
a node id. |
Returns : |
TRUE if nodeId participate to any mark (distance,
angle...). |
gboolean visu_gl_ext_marks_getHighlightStatus (VisuGlExtMarks *marks,guint nodeId);
Nodes can be highlighted.
|
a VisuGlExtMarks object. |
|
a node id (ranging from 0). |
Returns : |
TRUE if nodeId has an highlight. |
Since 3.7
GList * visu_gl_ext_marks_getHighlightedList
(VisuGlExtMarks *marks);
marks has a list of mark for some nodes. These marks are only
highlight marks.
|
a VisuGlExtMarks object ; |
Returns : |
list of
highlighted nodes (starting from 0), should freed with g_list_free(). [element-type guint32][transfer container]
|
Since 3.6
VisuGlExt * visu_gl_ext_marks_getInternalList (VisuGlExtMarks *marks);
Return an additional list used internaly.
|
a VisuGlExtMarks object. |
Returns : |
a VisuGlExt object. [transfer none] |
Since 3.7
gchar * visu_gl_ext_marks_getMeasurementLabels
(VisuGlExtMarks *marks);
Exports as a string the ids of nodes for measurement marks.
|
a VisuGlExtMarks object. |
Returns : |
a newly allocated string. |
Since 3.6
gchar * visu_gl_ext_marks_getMeasurementStrings (VisuGlExtMarks *marks,VisuData *dataObj);
Exports as a string all measurements stored in marks.
|
a VisuGlExtMarks object. |
|
the VisuData to apply the measurements to. |
Returns : |
a newly allocated string. |
Since 3.6
VisuGlExtMarks * visu_gl_ext_marks_new (const gchar *name);
Create a new VisuGlExtMarks object. Make it listen to "node-selection" signal to update itself automatically.
|
a possible name for the VisuGlExt. [allow-none] |
Returns : |
the newly created object. |
gboolean visu_gl_ext_marks_parseXMLFile (VisuGlExtMarks *marks,const gchar *filename,GList **infos,VisuGlExtInfosDrawId *drawingMode,guint *drawingInfos,GError **error);
This routines read from an XML file the description of selected
nodes, mark is updated accordingly.
|
a VisuGlExtMarks object. |
|
a location to save to. |
|
a location to a GList. [element-type guint32][out] |
|
a location to a flag. |
|
a location to a flag. |
|
a location to store an error. |
Returns : |
TRUE if no error. |
Since 3.5
gboolean visu_gl_ext_marks_removeMeasures (VisuGlExtMarks *marks,gint nodeId);
This routine scans the mark to remove all marks of distance or
angle where nodeId is implied in.
|
a VisuGlExtMarks object. |
|
a node id. |
Returns : |
TRUE is mark is changed. |
void visu_gl_ext_marks_setData (VisuGlExtMarks *marks,VisuData *data);
Attach the given marks to data. marks will be updated if data
is changed and internal list of marks is updated with the new nodes
of data.
|
a VisuGlExtMarks object. |
|
a VisuData object. |
gboolean visu_gl_ext_marks_setDrawValues (VisuGlExtMarks *marks,gboolean status);
Change if the measurements are printed or not (distance length, or angles...).
|
a VisuGlExtMarks object. |
|
a boolean. |
Returns : |
TRUE if marks is modified. |
void visu_gl_ext_marks_setGlView (VisuGlExtMarks *marks,VisuGlView *view);
Use the given view to render marks.
|
a VisuGlExtMarks object. |
|
a VisuGlView object. |
Since 3.7
gboolean visu_gl_ext_marks_setHighlightedList (VisuGlExtMarks *marks,GList *lst,VisuGlExtMarksStatus status);
marks has a list of mark for some nodes. These marks can be
highlight (or distance, angles...). Depending on status values,
the mark may be switch on or off.
|
a VisuGlExtMarks object ; |
|
a set of node ids (0 started) ;. [element-type guint32] |
|
changing command. |
Returns : |
TRUE if redraw needed. |
Since 3.6
gboolean visu_gl_ext_marks_setInfos (VisuGlExtMarks *marks,guint nodeId,gboolean status);
Depending on status, it removes all measurements from nodeId or
it calculate all first neighbour relations of nodeId.
Return: TRUE if marks is changed.
|
a VisuGlExtMarks object. |
|
a node id. |
|
a boolean. |
void visu_gl_ext_marks_setInteractive (VisuGlExtMarks *marks,VisuInteractive *inter);
Listen to "node-selection" signal to update marks.
|
a VisuGlExtMarks object. |
|
a VisuInteractive object. [transfer full][allow-none] |
Since 3.7
"highlightChanged" signalvoid user_function (VisuGlExtMarks *marks,
gpointer lst,
gpointer user_data) : No Hooks
The list of highlighted nodes has been modified.
|
the object emitting the signal. |
|
a list of node ids (starting from 0). |
|
user data set when the signal handler was connected. |
Since 3.6
"measurementChanged" signalvoid user_function (VisuGlExtMarks *marks,
gpointer user_data) : No Hooks
The list of measurements has been changed.
|
the object emitting the signal. |
|
user data set when the signal handler was connected. |
Since 3.6