| V_Sim API - Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Signals | ||||
enum VisuMarksStatus; #define VISU_MARKS_TYPE #define VISU_MARKS (obj) #define VISU_MARKS_CLASS (obj) #define IS_VISU_MARKS (obj) #define IS_VISU_MARKS_CLASS (obj) #define VISU_MARKS_GET_CLASS VisuMarks; VisuMarksClass; GType visu_marks_get_type (void); VisuMarks* visu_marks_new (); void visu_marks_setVisuData (VisuMarks *marks,VisuData *data); gboolean visu_marks_setHighlightedList (VisuMarks *marks,GList *lst,VisuMarksStatus status); GList* visu_marks_getHighlightedList (VisuMarks *marks); gboolean visu_marks_setInfos (VisuMarks *marks,guint nodeId,gboolean status); gboolean visu_marks_getActive (VisuMarks *marks,guint nodeId); gboolean visu_marks_setDrawValues (VisuMarks *marks,gboolean status); gboolean visu_marks_removeMeasures (VisuMarks *marks,gint nodeId); gboolean visu_marks_parseXMLFile (VisuMarks *marks,const gchar *filename,GList **infos,VisuGlExtInfosDrawId *drawingMode,guint *drawingInfos,GError **error); gboolean visu_marks_exportXMLFile (VisuMarks *marks,const gchar *filename,int *nodes,VisuGlExtInfosDrawId drawingMode,guint drawingInfos,GError **error); gchar* visu_marks_getMeasurementStrings (VisuMarks *marks,VisuData *dataObj); gchar* visu_marks_getMeasurementLabels (VisuMarks *marks);
"highlightChanged" : Run Last / No Recursion / No Hooks "measurementChanged" : Run Last / No Recursion / No Hooks
VisuMarks 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_marks_setHighlightedList().
In addition, VisuMarks can be export to or loaded from an
XML file thanks to visu_marks_exportXMLFile() and visu_marks_parseXMLFile().
typedef enum
{
MARKS_STATUS_TOGGLE,
MARKS_STATUS_SET,
MARKS_STATUS_UNSET
} VisuMarksStatus;
Possible parameters to change mark status, see
visu_marks_setHighlightedList() for instance.
| change the status of the mark ; | |
| set the mark on ; | |
| unset a mark. |
Since 3.6
#define VISU_MARKS_TYPE (visu_marks_get_type())
Return the associated GType to the VisuMarks objects.
Since 3.6
#define VISU_MARKS(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), VISU_MARKS_TYPE, VisuMarks))
Cast the given object to a VisuMarks object.
|
the widget to cast. |
Since 3.6
#define VISU_MARKS_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST((obj), VISU_MARKS, VisuMarksClass))
Cast the given class to a VisuMarks object.
|
the class to cast. |
Since 3.6
#define IS_VISU_MARKS(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), VISU_MARKS_TYPE))
Return if the given object is a valid VisuMarks object.
|
the object to test. |
Since 3.6
#define IS_VISU_MARKS_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((obj), VISU_MARKS_TYPE))
Return if the given class is a valid VisuMarksClass class.
|
the class to test. |
Since 3.6
#define VISU_MARKS_GET_CLASS (G_TYPE_INSTANCE_GET_CLASS((obj), VISU_MARKS_TYPE, VisuMarksClass))
Get the class of the given object.
|
the widget to get the class of. |
Since 3.6
typedef struct _VisuMarksClass VisuMarksClass;
An opaque structure defining the class of a VisuMarks objects.
Since 3.6
GType visu_marks_get_type (void);
Internal routine to get VISU_MARKS_TYPE value.
Since 3.6
VisuMarks* visu_marks_new ();
Create a new VisuMarks object. Make it listen to "node-selection" signal to update itself automatically.
Returns : |
the newly created object. |
void visu_marks_setVisuData (VisuMarks *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.
gboolean visu_marks_setHighlightedList (VisuMarks *marks,GList *lst,VisuMarksStatus 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 VisuMarks object ; |
|
a set of node ids (0 started) ;. element-type guint32. |
|
changing command. |
Returns : |
TRUE if redraw needed. |
Since 3.6
GList* visu_marks_getHighlightedList (VisuMarks *marks);
marks has a list of mark for some nodes. These marks can be
highlight (or distance, angles...).
|
a VisuMarks object ; |
Returns : |
list of
highlighted nodes (starting from 0), should freed with g_list_free().
. element-type guint32. transfer container guint32. |
Since 3.6
gboolean visu_marks_setInfos (VisuMarks *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 VisuMarks object. |
|
a node id. |
|
a boolean. |
gboolean visu_marks_getActive (VisuMarks *marks,guint nodeId);
Retrieve if nodeId is implied any measurement marks stored in mark.
|
a VisuMarks object. |
|
a node id. |
Returns : |
TRUE if nodeId participate to any mark (distance,
angle...).
|
gboolean visu_marks_setDrawValues (VisuMarks *marks,gboolean status);
Change if the measurements are printed or not (distance length, or angles...).
|
a VisuMarks object. |
|
a boolean. |
Returns : |
TRUE if marks is modified.
|
gboolean visu_marks_removeMeasures (VisuMarks *marks,gint nodeId);
This routine scans the mark to remove all marks of distance or
angle where nodeId is implied in.
|
a VisuMarks object. |
|
a node id. |
Returns : |
TRUE is mark is changed.
|
gboolean visu_marks_parseXMLFile (VisuMarks *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 VisuMarks object. |
|
a location to save to. |
|
a location to a GList. |
|
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_marks_exportXMLFile (VisuMarks *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 VisuMarks 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
gchar* visu_marks_getMeasurementStrings (VisuMarks *marks,VisuData *dataObj);
Exports as a string all measurements stored in marks.
|
a VisuMarks object. |
|
the VisuData to apply the measurements to. |
Returns : |
a newly allocated string. |
Since 3.6
"highlightChanged" signalvoid user_function (VisuMarks *marks, gpointer lst, gpointer user_data) : Run Last / No Recursion / 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