## VisuObject VisuObject — A general object to store the signals. |

## Synopsis

    #define             VISU_TYPE
    #define             VISU                                (obj)
    #define             VISU_CLASS                          (klass)
    #define             IS_VISU_TYPE                        (obj)
    #define             IS_VISU_CLASS                       (klass)
    #define             VISU_GET_CLASS                      (obj)
                        VisuObject;
                        VisuObjectClass;
    gboolean            visu_object_redraw                  (gpointer data);
    gboolean            visu_object_redrawForce             (gpointer data);
    #define             VISU_ADD_REDRAW
    #define             VISU_FORCE_REDRAW
    GType               visuObject_get_type                 (void);
    #define             VISU_INSTANCE
    VisuObject*         visuObjectGet_static                ();
    #define             VISU_SIGNALS
    gboolean            visu_object_setRendering            (VisuObject *obj,
                                                             VisuRendering *method);
    VisuRendering*      visu_object_getRendering            (VisuObject *obj);

## Object Hierarchy

      GObject
       +----VisuObject

## Signals

      "DirectoryChanged"                               : Run Last / No Recursion / No Hooks
      "OpenGLAskForReDraw"                             : Run Last / No Recursion / No Hooks
      "OpenGLForceReDraw"                              : Run Last / No Recursion / No Hooks
      "colorNewAvailable"                              : Run Last / No Recursion / No Hooks
      "dataLoaded"                                     : Run Last / No Recursion / No Hooks
      "dataNew"                                        : Run Last / No Recursion / No Hooks
      "dataReadyForRendering"                          : Run Last / No Recursion / No Hooks
      "renderingChanged"                               : Run Last / No Recursion / No Hooks
      "resourcesLoaded"                                : Run Last / No Recursion / No Hooks

## Description

At the present time, the signals are global to all V_Sim, owned by a variable include in each parts called visu. This is wherre these signals are defined.

## Details

### VISU_TYPE

    #define VISU_TYPE		  (visuObject_get_type ())

return the type of VisuObject.

### VISU()

    #define VISU(obj)		  (G_TYPE_CHECK_INSTANCE_CAST ((obj), VISU_TYPE, VisuObject))

Cast the given `obj` into VisuObject type.

`obj` : | a GObject to cast.

### VISU_CLASS()

    #define VISU_CLASS(klass)	  (G_TYPE_CHECK_CLASS_CAST ((klass), VISU_TYPE, VisuObjectClass))

Cast the given `klass` into VisuObjectClass.

`klass` : | a GObjectClass to cast.

### IS_VISU_TYPE()

    #define IS_VISU_TYPE(obj)	  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VISU_TYPE))

Test if the given `ogj` is of the type of VisuObject object.

`obj` : | a GObject to test.

### IS_VISU_CLASS()

    #define IS_VISU_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VISU_TYPE))

Test if the given `klass` is of the type of VisuObjectClass class.

`klass` : | a GObjectClass to test.

### VISU_GET_CLASS()

    #define VISU_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), VISU_TYPE, VisuObjectClass))

It returns the class of the given `obj`.

`obj` : | a GObject to get the class of.

### VisuObject

    typedef struct _VisuObject VisuObject;

A short way to identify _VisuObject structure.

### VisuObjectClass

    typedef struct {
      GObjectClass parent;

      guint signals[VISU_NB_SIGNAL];
    } VisuObjectClass;

This structure describes the class VisuObjectClass.

GObjectClass `parent`; | an object to inherit from (NULL here).
guint `signals`[VISU_NB_SIGNAL]; | the array with the signals.

### visu_object_redraw ()

    gboolean            visu_object_redraw                  (gpointer data);

Call the signal OpenGLAskForReDraw. The API is adapted to the routine to be added in the gloop. Use VISU_ADD_REDRAW instead of this routine.

`data` : | a string.. allow-none.
Returns : | FALSE to stop the emission as soon as done.

### visu_object_redrawForce ()

    gboolean            visu_object_redrawForce             (gpointer data);

Call the signal OpenGLForceReDraw. The API is adapted to the routine to be added in the gloop. Use VISU_FORCE_REDRAW instead of this routine.

`data` : | a string.. allow-none.
Returns : | FALSE to stop the emission as soon as done.

### VISU_ADD_REDRAW

    #define VISU_ADD_REDRAW   g_idle_add(visu_object_redraw, (gpointer)__func__)

A macro to ask V_Sim to redraw the rendering area at next idle time, except if the deferred redraw option is set.

### VISU_FORCE_REDRAW

    #define VISU_FORCE_REDRAW g_idle_add(visu_object_redrawForce, (gpointer)__func__)

Force V_Sim to redraw at the next idle time, whatever value for the deferred redraw option.

### visuObject_get_type ()

    GType               visuObject_get_type                 (void);

This method returns the type of VisuObject, use VISU_TYPE instead.

Returns : | the type of VisuObject.

### VISU_INSTANCE

    #define VISU_INSTANCE visuObjectGet_static()

This routine is used to get the global VisuObject object to listen to its signals.

### visuObjectGet_static ()

    VisuObject*         visuObjectGet_static                ();

Internal routine to access the VisuObject object instanciated by default. Use VISU_INSTANCE instead.

### VISU_SIGNALS

    #define VISU_SIGNALS VISU_GET_CLASS(VISU_INSTANCE)->signals

Get the list of signals of a VisuObject.

### visu_object_setRendering ()

    gboolean            visu_object_setRendering            (VisuObject *obj,
                                                             VisuRendering *method);

Choose the method used to render the data.

`obj` : | a VisuObject object.
`method` : | a VisuRendering method.
Returns : | TRUE if the rendering method of `obj` is actually changed.

### visu_object_getRendering ()

    VisuRendering*      visu_object_getRendering            (VisuObject *obj);

Get the current method used to render the data.

`obj` : | a VisuObject object.
Returns : | the rendering method attached to `obj`.

## Signal Details

### The `"DirectoryChanged"` signal

    void                user_function                      (VisuObject *visuObj,
                                                            guint       kind,
                                                            gpointer    user_data)      : Run Last / No Recursion / No Hooks

The current directory has been changed. The kind of directory is defined by `kind` (see #).

`visuObj` : | the object emitting the signal.
`kind` : | a flag.
`user_data` : | user data set when the signal handler was connected.

Since 3.6

### The `"OpenGLAskForReDraw"` signal

    void                user_function                      (VisuObject *visuObj,
                                                            gpointer    user_data)      : Run Last / No Recursion / No Hooks

Internal signal, use `VISU_ADD_REDRAW()` instead.

`visuObj` : | the object emitting the signal.
`user_data` : | user data set when the signal handler was connected.

### The `"OpenGLForceReDraw"` signal

    void                user_function                      (VisuObject *visuObj,
                                                            gpointer    user_data)      : Run Last / No Recursion / No Hooks

Internal signal, use `VISU_FORCE_REDRAW()` instead.

`visuObj` : | the object emitting the signal.
`user_data` : | user data set when the signal handler was connected.

### The `"colorNewAvailable"` signal

    void                user_function                      (VisuObject *visuObj,
                                                            gpointer    color,
                                                            gpointer    user_data)      : Run Last / No Recursion / No Hooks

A new ToolColor is available.

`visuObj` : | the object emitting the signal.
`color` : | the newly created ToolColor.
`user_data` : | user data set when the signal handler was connected.

Since 3.2

### The `"dataLoaded"` signal

    void                user_function                      (VisuObject *visuObj,
                                                            GObject    *dataObj,
                                                            gpointer    user_data)      : Run Last / No Recursion / No Hooks

The given `dataObj` is fully populated and ready for usage.

`visuObj` : | the object emitting the signal.
`dataObj` : | the newly created VisuData.
`user_data` : | user data set when the signal handler was connected.

Since 3.1

### The `"dataNew"` signal

    void                user_function                      (VisuObject *visuObj,
                                                            GObject    *dataObj,
                                                            gpointer    user_data)      : Run Last / No Recursion / No Hooks

A new VisuData is available.

`visuObj` : | the object emitting the signal.
`dataObj` : | the newly created VisuData.
`user_data` : | user data set when the signal handler was connected.

Since 3.2

### The `"dataReadyForRendering"` signal

    void                user_function                      (VisuObject *visuObj,
                                                            GObject    *dataObj,
                                                            gpointer    user_data)      : Run Last / No Recursion / No Hooks

The given `dataObj` is fully set up and ready for rendering (no further internal modifications will occur).

`visuObj` : | the object emitting the signal.
`dataObj` : | the newly created VisuData.
`user_data` : | user data set when the signal handler was connected.

### The `"renderingChanged"` signal

    void                user_function                      (VisuObject *visuObj,
                                                            gpointer    meth,
                                                            gpointer    user_data)      : Run Last / No Recursion / No Hooks

The rendering method has been changed.

`visuObj` : | the object emitting the signal.
`meth` : | the newly chosen VisuRendering method.
`user_data` : | user data set when the signal handler was connected.

### The `"resourcesLoaded"` signal

    void                user_function                      (VisuObject *visuObj,
                                                            GObject    *dataObj,
                                                            gpointer    user_data)      : Run Last / No Recursion / No Hooks

The resource file has been read.

`visuObj` : | the object emitting the signal.
`dataObj` : | the associated VisuData.
`user_data` : | user data set when the signal handler was connected.