VisuGlExtMarks

VisuGlExtMarks — Draw features on nodes, like measurement marks or highlights.

Functions

Properties

VisuGlView * gl-view Read / Write
guint hiding-mode Read / Write
GArray * highlight Read / Write
VisuInteractive * interactive Read / Write

Signals

Types and Values

Object Hierarchy

    GObject
    ╰── ToolDbgObj
        ╰── VisuGlExt
            ╰── VisuGlExtMarks

Implemented Interfaces

VisuGlExtMarks implements VisuNodeMasker.

Description

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().

Functions

visu_gl_ext_marks_new ()

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.

Parameters

name

a possible name for the VisuGlExt.

[allow-none]

Returns

the newly created object.


visu_gl_ext_marks_setDataRenderer ()

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 .

Parameters

marks

a VisuGlExtMarks object.

 

renderer

a VisuNodeArrayRenderer object.

 

visu_gl_ext_marks_setInteractive ()

void
visu_gl_ext_marks_setInteractive (VisuGlExtMarks *marks,
                                  VisuInteractive *inter);

Listen to “node-selection” signal to update marks .

Parameters

marks

a VisuGlExtMarks object.

 

inter

a VisuInteractive object.

[transfer full][allow-none]

Since: 3.7


visu_gl_ext_marks_setHighlight ()

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.

Parameters

marks

a VisuGlExtMarks object ;

 

nodes

a set of node ids (0 started) ;.

[element-type guint32]

status

changing command.

 

Returns

TRUE if redraw needed.

Since: 3.6


visu_gl_ext_marks_unHighlight ()

gboolean
visu_gl_ext_marks_unHighlight (VisuGlExtMarks *marks);

Remove all highlight marks.

Parameters

marks

a VisuGlExtMarks object.

 

Returns

TRUE if anything was highlighted.

Since: 3.8


visu_gl_ext_marks_getHighlighted ()

GArray *
visu_gl_ext_marks_getHighlighted (const VisuGlExtMarks *marks);

marks has a list of mark for some nodes. These marks are only highlight marks.

Parameters

marks

a VisuGlExtMarks object ;

 

Returns

list of highlighted nodes (starting from 0), should not be freed.

[element-type guint][transfer none]

Since: 3.6


visu_gl_ext_marks_setInfos ()

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.

Parameters

marks

a VisuGlExtMarks object.

 

nodeId

a node id.

 

status

a boolean.

 

visu_gl_ext_marks_getActive ()

gboolean
visu_gl_ext_marks_getActive (VisuGlExtMarks *marks,
                             guint nodeId);

Retrieve if nodeId is implied any measurement marks stored in mark .

Parameters

marks

a VisuGlExtMarks object.

 

nodeId

a node id.

 

Returns

TRUE if nodeId participate to any mark (distance, angle...).


visu_gl_ext_marks_getHighlightStatus ()

gboolean
visu_gl_ext_marks_getHighlightStatus (VisuGlExtMarks *marks,
                                      guint nodeId);

Nodes can be highlighted.

Parameters

marks

a VisuGlExtMarks object.

 

nodeId

a node id (ranging from 0).

 

Returns

TRUE if nodeId has an highlight.

Since: 3.7


visu_gl_ext_marks_setDrawValues ()

gboolean
visu_gl_ext_marks_setDrawValues (VisuGlExtMarks *marks,
                                 gboolean status);

Change if the measurements are printed or not (distance length, or angles...).

Parameters

marks

a VisuGlExtMarks object.

 

status

a boolean.

 

Returns

TRUE if marks is modified.


visu_gl_ext_marks_removeMeasures ()

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.

Parameters

marks

a VisuGlExtMarks object.

 

nodeId

a node id.

 

Returns

TRUE is mark is changed.


visu_gl_ext_marks_parseXMLFile ()

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.

Parameters

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.

 

Returns

TRUE if no error.

Since: 3.5


visu_gl_ext_marks_exportXMLFile ()

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.

Parameters

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.

 

Returns

TRUE if no error.

Since: 3.5


visu_gl_ext_marks_getMeasurementStrings ()

gchar *
visu_gl_ext_marks_getMeasurementStrings
                               (VisuGlExtMarks *marks);

Exports as a string all measurements stored in marks .

Parameters

marks

a VisuGlExtMarks object.

 

Returns

a newly allocated string.

Since: 3.6


visu_gl_ext_marks_getMeasurementLabels ()

gchar *
visu_gl_ext_marks_getMeasurementLabels
                               (VisuGlExtMarks *marks);

Exports as a string the ids of nodes for measurement marks.

Parameters

marks

a VisuGlExtMarks object.

 

Returns

a newly allocated string.

Since: 3.6


visu_gl_ext_marks_getInternalList ()

VisuGlExt *
visu_gl_ext_marks_getInternalList (VisuGlExtMarks *marks);

Return an additional list used internaly.

Parameters

marks

a VisuGlExtMarks object.

 

Returns

a VisuGlExt object.

[transfer none]

Since: 3.7


visu_gl_ext_marks_getHidingMode ()

VisuGlExtMarksHidingModes
visu_gl_ext_marks_getHidingMode (const VisuGlExtMarks *marks);

Retrieves the hiding mode of marks , see VisuGlExtMarksHidingModes.

Parameters

marks

a VisuGlExtMarks object.

 

Returns

a VisuGlExtMarksHidingModes value.

Since: 3.8


visu_gl_ext_marks_setHidingMode ()

gboolean
visu_gl_ext_marks_setHidingMode (VisuGlExtMarks *marks,
                                 VisuGlExtMarksHidingModes mode);

Change the hiding mode of marks .

Parameters

marks

a VisuGlExtMarks object.

 

mode

a VisuGlExtMarksHidingModes value.

 

Returns

TRUE if value is actually changed.

Types and Values

enum VisuGlExtMarksStatus

Possible parameters to change mark status, see visu_gl_ext_marks_setHighlightedList() for instance.

Members

MARKS_STATUS_KEEP

do not change the status of the mark ;

 

MARKS_STATUS_TOGGLE

change the status of the mark ;

 

MARKS_STATUS_SET

set the mark on ;

 

MARKS_STATUS_UNSET

unset a mark.

 

Since: 3.6


enum VisuGlExtMarksHidingModes

Possible parameters used by visu_gl_ext_marks_setHidingMode().

Members

HIDE_NONE

don't hide nodes.

 

HIDE_HIGHLIGHT

hide highlighted nodes.

 

HIDE_NON_HIGHLIGHT

hide all non-highlighted nodes.

 

Since: 3.8


struct VisuGlExtMarks

struct VisuGlExtMarks;

All fields are private.

Since: 3.6


struct VisuGlExtMarksClass

struct VisuGlExtMarksClass {
  VisuGlExtClass parent;
};

An opaque structure defining the class of a VisuGlExtMarks objects.

Members

VisuGlExtClass parent;

the parent class.

 

Since: 3.6

Property Details

The “gl-view” property

  “gl-view”                  VisuGlView *

GlView mark labels are aligned with.

Flags: Read / Write


The “hiding-mode” property

  “hiding-mode”              guint

nodes hiding property.

Flags: Read / Write

Allowed values: <= 2

Default value: 0


The “highlight” property

  “highlight”                GArray *

node ids with highlight mark.

Flags: Read / Write


The “interactive” property

  “interactive”              VisuInteractive *

Interactive the marks react on.

Flags: Read / Write

Signal Details

The “measurementChanged” signal

void
user_function (VisuGlExtMarks *marks,
               VisuData       *data,
               gpointer        user_data)

The list of measurements has been changed.

Parameters

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