Top | ![]() |
![]() |
![]() |
![]() |
GObject ╰── ToolDbgObj ╰── VisuNodeValues ├── VisuNodeValuesFarray ├── VisuNodeValuesFrag ├── VisuNodeValuesId ├── VisuNodeValuesString ╰── VisuNodeValuesType
This is the base object to store data for each node. In addition, it provides routines to convert this information from and to strings. It is also possible to get notification on any changes of this information.
gboolean (*VisuNodeValuesFromString) (VisuNodeValues *vals
,VisuNode *node
,const gchar *string
);
Prototype of functions used to parse string
and store its content
for node
in vals
.
Since: 3.8
gchar * (*VisuNodeValuestoString) (const VisuNodeValues *vals
,const VisuNode *node
);
Prototype of functions used to stringify the node values of node
from vals
.
Since: 3.8
gboolean (*VisuNodeValuesSetAt) (VisuNodeValues *vals
,const VisuNode *node
,GValue *value
);
Prototype of functions used to store the content of value
for
node
in vals
.
Since: 3.8
gboolean (*VisuNodeValuesGetAt) (const VisuNodeValues *vals
,const VisuNode *node
,GValue *value
);
Prototype of functions used to store in value
the values
associated to node
from vals
.
Since: 3.8
VisuNodeValues * visu_node_values_new (VisuNodeArray *arr
,const gchar *label
,GType type
,guint dim
);
Creates a new VisuNodeValues object, used to store dim
values of
type type
for each node in arr
.
Since: 3.8
gboolean visu_node_values_fromArray (VisuNodeValues *vals
,const VisuNodeArray *arr
);
Tests if arr
is used as base for vals
.
Since: 3.8
const gchar *
visu_node_values_getLabel (const VisuNodeValues *vals
);
Retrives the label used to identify vals
.
Since: 3.8
guint
visu_node_values_getDimension (const VisuNodeValues *vals
);
Retrieves how many values are stored per node, aka the column number.
Since: 3.8
void visu_node_values_setEditable (VisuNodeValues *vals
,gboolean status
);
Change the writable status
of vals
.
Since: 3.8
gboolean
visu_node_values_getEditable (const VisuNodeValues *vals
);
Retrieves if vals
are writable or not.
Since: 3.8
gboolean visu_node_values_setFromString (VisuNodeValues *vals
,VisuNode *node
,const gchar *from
);
Parse from
to set a value to node
in vals
.
Since: 3.8
gboolean visu_node_values_setFromStringForId (VisuNodeValues *vals
,guint nodeId
,const gchar *from
);
Same as visu_node_values_setFromString()
, but uses a node id to
identify a VisuNode in vals
.
Since: 3.8
gchar * visu_node_values_toString (const VisuNodeValues *vals
,const VisuNode *node
);
Creates a string representation of the value stored for node
.
Since: 3.8
gchar * visu_node_values_toStringFromId (const VisuNodeValues *vals
,guint nodeId
);
Like visu_node_values_toString()
, but using a string id.
Since: 3.8
gboolean visu_node_values_setAt (VisuNodeValues *vals
,const VisuNode *node
,GValue *value
);
Set value
for node
in vals
.
Since: 3.8
gboolean visu_node_values_getAt (const VisuNodeValues *vals
,const VisuNode *node
,GValue *value
);
Retrieves the value stored in vals
for node
. value
is
initialised to the proper type at each call. For repeatedly
retrieving values for various nodes, prefer to use a
VisuNodeValuesIter instead.
vals |
a VisuNodeValues object. |
|
node |
a VisuNode structure. |
|
value |
a value location. |
[out caller-allocates] |
Since: 3.8
gpointer visu_node_values_getPtrAt (const VisuNodeValues *vals
,const VisuNode *node
);
Retrieve the values associated to node
, as long as it can be
stored as a pointer. This is aconvenient function to avoid
instanciating a GValue.
Since: 3.8
gboolean visu_node_values_copy (VisuNodeValues *vals
,const VisuNodeValues *from
);
Copies all values from
to vals
, providing that from
and vals
store compatible data. The values are copied using the VisuNode
id. If an id for a node of vals
is not found in from
, no node
value is copied for this node. The original id is used.
Since: 3.8
VisuNodeArray *
visu_node_values_getArray (const VisuNodeValues *vals
);
Retrieves the VisuNodeArray, vels
is based on.
Since: 3.8
void
visu_node_values_reset (VisuNodeValues *vals
);
Reset all stored values.
Since: 3.8
gboolean visu_node_values_iter_new (VisuNodeValuesIter *iter
,VisuNodeArrayIterType type
,VisuNodeValues *vals
);
Creates an iterator to run over node values stored in vals
,
following type
way of iterate.
iter |
an iterator location. |
[out caller-allocates] |
type |
a iteration type. |
|
vals |
a VisuNodeValues object. |
Since: 3.8
void visu_node_values___iter__ (VisuNodeValues *vals
,VisuNodeValuesIter *iter
);
Creates an iterator to run over node values stored in vals
. This
routine is mainly for Python bindings, use
visu_node_values_iter_new()
instead.
Since: 3.8
gboolean
visu_node_values_iter_next (VisuNodeValuesIter *iter
);
Iterates to the next node value.
Since: 3.8
struct VisuNodeValuesClass { VisuObjectClass parent; VisuNodeValuesFromString parse; VisuNodeValuestoString serialize; VisuNodeValuesSetAt setAt; VisuNodeValuesGetAt getAt; };
Common name to refer to a _VisuNodeValuesClass.
private. |
||
VisuNodeValuesFromString |
a routine to get values from a string. |
|
VisuNodeValuestoString |
a routine to write format into a string. |
|
VisuNodeValuesSetAt |
a routine to store values at a node. |
|
VisuNodeValuesGetAt |
a routine to get values at a node. |
struct VisuNodeValuesIter { GValue value; VisuNodeArrayIter iter; /* Private. */ VisuNodeValues *vals; };
Iterator structure used to read values of nodes.
GValue |
the stored value. |
|
VisuNodeArrayIter |
the iterator used to span nodes. |
|
VisuNodeValues * |
the parent VisuNodeValues object. |
Since: 3.8
“editable”
property“editable” gboolean
user can modify the value.
Flags: Read / Write
Default value: TRUE
“internal”
property“internal” gboolean
internal to VisuNode structure.
Flags: Write / Construct Only
Default value: FALSE
“label”
property“label” gchar *
description label.
Flags: Read / Write / Construct Only
Default value: ""
“n-elements”
property“n-elements” guint
number of dimensions.
Flags: Read / Write / Construct Only
Allowed values: [1,G_MAXINT]
Default value: 1
“nodes”
property“nodes” VisuNodeArray *
nodes values are related to.
Flags: Read / Write / Construct Only
“type”
property“type” GType *
type of the values.
Flags: Read / Write / Construct Only
Allowed values: void
“changed”
signalvoid user_function (VisuNodeValues *vals, VisuNode *node, gpointer user_data)
Gets emitted when the values corresponding to this node property
are changed for node
.
vals |
the object which received the signal ; |
|
node |
the VisuNode that is modified. |
|
user_data |
user data set when the signal handler was connected. |
Flags: No Hooks
Since: 3.8