Top | ![]() |
![]() |
![]() |
![]() |
VisuGlView * | gl-view | Read / Write |
guint | hiding-mode | Read / Write |
GArray * | highlight | Read / Write |
VisuInteractive * | interactive | Read / Write |
enum | VisuGlExtMarksStatus |
enum | VisuGlExtMarksHidingModes |
struct | VisuGlExtMarks |
struct | VisuGlExtMarksClass |
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()
.
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.
void visu_gl_ext_marks_setDataRenderer (VisuGlExtMarks *marks
,VisuNodeArrayRenderer *renderer
);
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
.
void visu_gl_ext_marks_setInteractive (VisuGlExtMarks *marks
,VisuInteractive *inter
);
Listen to “node-selection” signal to update marks
.
marks |
a VisuGlExtMarks object. |
|
inter |
a VisuInteractive object. |
[transfer full][allow-none] |
Since: 3.7
gboolean visu_gl_ext_marks_setHighlight (VisuGlExtMarks *marks
,GArray *nodes
,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.
marks |
a VisuGlExtMarks object ; |
|
nodes |
a set of node ids (0 started) ;. |
[element-type guint32] |
status |
changing command. |
Since: 3.6
gboolean
visu_gl_ext_marks_unHighlight (VisuGlExtMarks *marks
);
Remove all highlight marks.
Since: 3.8
GArray *
visu_gl_ext_marks_getHighlighted (const VisuGlExtMarks *marks
);
marks
has a list of mark for some nodes. These marks are only
highlight marks.
list of highlighted nodes (starting from 0), should not be freed.
[element-type guint][transfer none]
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.
gboolean visu_gl_ext_marks_getActive (VisuGlExtMarks *marks
,guint nodeId
);
Retrieve if nodeId
is implied any measurement marks stored in mark
.
gboolean visu_gl_ext_marks_getHighlightStatus (VisuGlExtMarks *marks
,guint nodeId
);
Nodes can be highlighted.
Since: 3.7
gboolean visu_gl_ext_marks_setDrawValues (VisuGlExtMarks *marks
,gboolean status
);
Change if the measurements are printed or not (distance length, or angles...).
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.
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.
marks |
a VisuGlExtMarks object. |
|
filename |
a location to save to. |
|
infos |
a location to a GList. |
[element-type guint32][out] |
drawingMode |
a location to a flag. |
|
drawingInfos |
a location to a flag. |
|
error |
a location to store an error. |
Since: 3.5
gboolean visu_gl_ext_marks_exportXMLFile (VisuGlExtMarks *marks
,const gchar *filename
,GArray *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.
marks |
a VisuGlExtMarks object. |
|
filename |
a location to save to. |
|
nodes |
an array of node ids. |
[element-type uint] |
drawingMode |
a flag. |
|
drawingInfos |
a flag. |
|
error |
a location to store an error. |
Since: 3.5
gchar *
visu_gl_ext_marks_getMeasurementStrings
(VisuGlExtMarks *marks
);
Exports as a string all measurements stored in marks
.
Since: 3.6
gchar *
visu_gl_ext_marks_getMeasurementLabels
(VisuGlExtMarks *marks
);
Exports as a string the ids of nodes for measurement marks.
Since: 3.6
VisuGlExt *
visu_gl_ext_marks_getInternalList (VisuGlExtMarks *marks
);
Return an additional list used internaly.
Since: 3.7
VisuGlExtMarksHidingModes
visu_gl_ext_marks_getHidingMode (const VisuGlExtMarks *marks
);
Retrieves the hiding mode of marks
, see VisuGlExtMarksHidingModes.
Since: 3.8
gboolean visu_gl_ext_marks_setHidingMode (VisuGlExtMarks *marks
,VisuGlExtMarksHidingModes mode
);
Change the hiding mode of marks
.
Possible parameters to change mark status, see
visu_gl_ext_marks_setHighlightedList()
for instance.
Since: 3.6
Possible parameters used by visu_gl_ext_marks_setHidingMode()
.
Since: 3.8
struct VisuGlExtMarksClass { VisuGlExtClass parent; };
An opaque structure defining the class of a VisuGlExtMarks objects.
Since: 3.6
“gl-view”
property“gl-view” VisuGlView *
GlView mark labels are aligned with.
Flags: Read / Write
“hiding-mode”
property“hiding-mode” guint
nodes hiding property.
Flags: Read / Write
Allowed values: <= 2
Default value: 0
“interactive”
property“interactive” VisuInteractive *
Interactive the marks react on.
Flags: Read / Write
“measurementChanged”
signalvoid user_function (VisuGlExtMarks *marks, VisuData *data, gpointer user_data)
The list of measurements has been changed.
marks |
the object emitting the signal. |
|
data |
the VisuData the measurement is done on. |
|
user_data |
user data set when the signal handler was connected. |
Flags: No Hooks
Since: 3.6