VisuDataColorizer

VisuDataColorizer — a virtual class to colorise VisuNodeArray.

Functions

Properties

gboolean active Read / Write
VisuNodeValues * model Read / Write
gchar * source Read / Write

Signals

Types and Values

Object Hierarchy

    GObject
    ╰── ToolDbgObj
        ╰── VisuDataColorizer
            ├── VisuColorization
            ├── VisuDataColorizerFragment
            ╰── VisuDataColorizerVector

Description

Functions

visu_data_colorizer_setActive ()

gboolean
visu_data_colorizer_setActive (VisuDataColorizer *colorizer,
                               gboolean status);

Changes the active status of colorizer .

Parameters

colorizer

a VisuDataColorizer object.

 

status

a boolean.

 

Returns

TRUE if the status is actually changed.

Since: 3.8


visu_data_colorizer_getActive ()

gboolean
visu_data_colorizer_getActive (const VisuDataColorizer *colorizer);

Retrieve if colorizer is actively changing the VisuNode colours.

Parameters

colorizer

a VisuDataColorizer object.

 

Returns

TRUE if colorizer is active.

Since: 3.8


visu_data_colorizer_setDirty ()

gboolean
visu_data_colorizer_setDirty (VisuDataColorizer *colorizer);

Notifies when colorizer colorising parameters have been changed.

Parameters

colorizer

a VisuDataColorizer object.

 

Returns

TRUE if dirty status is actually changed.

Since: 3.8


visu_data_colorizer_getNodeModel ()

VisuNodeValues *
visu_data_colorizer_getNodeModel (VisuDataColorizer *colorizer);

If colorizer is based on a VisuNodeValues, this function retrieves it.

Parameters

colorizer

a VisuDataColorizer object.

 

Returns

a VisuNodeValues model owned by V_Sim.

[transfer none]

Since: 3.8


visu_data_colorizer_getConstNodeModel ()

const VisuNodeValues *
visu_data_colorizer_getConstNodeModel (const VisuDataColorizer *colorizer);

Retrieves the VisuNodeValues model used by colorizer . This value may be NULL if colorizer is not using any VisuNodeValues model.

Parameters

colorizer

a VisuDataColorizer object.

 

Returns

the VisuNodeValues model attached to colorizer .

[allow-none]

Since: 3.8


visu_data_colorizer_setNodeModel ()

gboolean
visu_data_colorizer_setNodeModel (VisuDataColorizer *colorizer,
                                  VisuNodeValues *model);

Calls the class function to set the VisuNodeValues model used by colorizer .

Parameters

colorizer

a VisuDataColorizer object.

 

model

a VisuNodeValues object.

 

Returns

TRUE if the model is actually changed.

Since: 3.8


visu_data_colorizer_setSource ()

gboolean
visu_data_colorizer_setSource (VisuDataColorizer *colorizer,
                               const gchar *source);

colorizer can be bound to a specific VisuNodeValues defined by its name. When source is not NULL and colorizer attached to a VisuNodeArrayRenderer, see visu_node_array_renderer_setColorizer(), its model is changed to match any VisuNodeValues of its current VisuNodeArray with the label source .

Parameters

colorizer

a VisuDataColorizer object.

 

source

a property name.

 

Returns

TRUE if the value is actually changed.

Since: 3.8


visu_data_colorizer_getSource ()

const gchar *
visu_data_colorizer_getSource (const VisuDataColorizer *colorizer);

Retrieves the name of the property colorizer should be bound to to retrieve its VisuNodeValues model.

Parameters

colorizer

a VisuDataColorizer object.

 

Returns

a property name.

[allow-none]

Since: 3.8


visu_data_colorizer_getColor ()

gboolean
visu_data_colorizer_getColor (const VisuDataColorizer *colorizer,
                              float rgba[4],
                              const VisuData *visuData,
                              const VisuNode *node);

Call the class colorizer function of colorizer to setup a colour in rgba for given node inside visuData . If there is no specific colour for this node and the default element colour should be used instead, this function returns FALSE.

Parameters

colorizer

a VisuDataColorizer object.

 

rgba

a location for store a colour definition.

[array fixed-size=4][out caller-allocates]

visuData

a VisuData object.

 

node

a VisuNode structure.

 

Returns

TRUE if colorizer can actually provide a colour for node .

Since: 3.8


visu_data_colorizer_getScalingFactor ()

gfloat
visu_data_colorizer_getScalingFactor (const VisuDataColorizer *colorizer,
                                      const VisuData *visuData,
                                      const VisuNode *node);

Calls the class scaling function of colorizer to retrieve a scaling factor for node in visuData .

Parameters

colorizer

a VisuDataColorizer object.

 

visuData

a VisuData object.

 

node

a VisuNode structure.

 

Returns

a scaling factor.

Since: 3.8

Types and Values

struct VisuDataColorizer

struct VisuDataColorizer;

Structure used to define VisuDataColorizer objects.

Since: 3.8


struct VisuDataColorizerClass

struct VisuDataColorizerClass {
  VisuObjectClass parent;

  gboolean (*setNodeModel)(VisuDataColorizer *colorizer,
                           VisuNodeValues *model);
  gboolean (*colorize)(const VisuDataColorizer *colorizer, float rgba[4],
                       const VisuData *visuData, const VisuNode* node);
  gfloat (*scale)(const VisuDataColorizer *colorizer,
                  const VisuData *visuData, const VisuNode* node);
};

Interface for class that can represent VisuDataColorizer.

Members

VisuObjectClass parent;

its parent.

 

setNodeModel ()

a method to change the VisuNodeValues used to store the model.

 

colorize ()

a method to colorize a given node according to a model.

 

scale ()

a method to scale a given node according to a model.

 

Since: 3.8

Property Details

The “active” property

  “active”                   gboolean

active.

Flags: Read / Write

Default value: FALSE


The “model” property

  “model”                    VisuNodeValues *

model.

Flags: Read / Write


The “source” property

  “source”                   gchar *

node property name.

Flags: Read / Write

Default value: NULL

Signal Details

The “dirty” signal

void
user_function (VisuDataColorizer *arg0,
               gpointer           user_data)

Gets emitted when colorizer characteristics have changed and a redraw is needed.

Parameters

user_data

user data set when the signal handler was connected.

 

Flags: No Hooks

Since: 3.8