gtk_orientationChooser

gtk_orientationChooser — Defines a dialog widget to choose the camera position.

Synopsis

#include <coreTools/toolMatrix.h>

                    VisuUiOrientationChooser;
                    VisuUiOrientationChooserClass;
enum                VisuUiOrientationChooserKind;
void                visu_ui_orientation_chooser_getAnglesValues
                                                        (VisuUiOrientationChooser *orientation,
                                                         float values[2]);
void                visu_ui_orientation_chooser_getBoxValues
                                                        (VisuUiOrientationChooser *orientation,
                                                         float values[3]);
void                visu_ui_orientation_chooser_getOrthoValues
                                                        (VisuUiOrientationChooser *orientation,
                                                         float values[3]);
GtkWidget *         visu_ui_orientation_chooser_new     (VisuUiOrientationChooserKind kind,
                                                         gboolean liveUpdate,
                                                         VisuData *data,
                                                         GtkWindow *parent);
void                visu_ui_orientation_chooser_setAnglesValues
                                                        (VisuUiOrientationChooser *orientation,
                                                         float values[2]);
void                visu_ui_orientation_chooser_setBoxValues
                                                        (VisuUiOrientationChooser *orientation,
                                                         float values[3]);
void                visu_ui_orientation_chooser_setOrthoValues
                                                        (VisuUiOrientationChooser *orientation,
                                                         float values[3]);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkWidget
               +----GtkContainer
                     +----GtkBin
                           +----GtkWindow
                                 +----GtkDialog
                                       +----VisuUiOrientationChooser

Implemented Interfaces

VisuUiOrientationChooser implements AtkImplementorIface and GtkBuildable.

Signals

  "values-changed"                                 : Action

Description

This widget is a GtkDialog window that can be used to choose an orientation for the camera, using either the cartesian coordinates, the box coordinates or the spherical coordinates.

Details

VisuUiOrientationChooser

typedef struct _VisuUiOrientationChooser VisuUiOrientationChooser;

Short form for a VisuUiOrientationChooser_struct structure.


VisuUiOrientationChooserClass

typedef struct _VisuUiOrientationChooserClass VisuUiOrientationChooserClass;

Opaque structure.


enum VisuUiOrientationChooserKind

typedef enum {
    VISU_UI_ORIENTATION_DIRECTION,
    VISU_UI_ORIENTATION_NORMAL
} VisuUiOrientationChooserKind;

These values are used when creating an VisuUiOrientationChooser, to specify the behavior of the box coordinates. This is due to the fact that the box coordinates are not always orthoggonal.

VISU_UI_ORIENTATION_DIRECTION

this flag specifies that the box coordinates are used to identity a direction ;

VISU_UI_ORIENTATION_NORMAL

this flag specifies that the box coordinates are used to identify a normal direction.

visu_ui_orientation_chooser_getAnglesValues ()

void                visu_ui_orientation_chooser_getAnglesValues
                                                        (VisuUiOrientationChooser *orientation,
                                                         float values[2]);

Get the current orientation in the spherical basis set.

orientation :

a VisuUiOrientationChooser widget ;

values :

a location for two floating point values. [array fixed-size=2][out]

visu_ui_orientation_chooser_getBoxValues ()

void                visu_ui_orientation_chooser_getBoxValues
                                                        (VisuUiOrientationChooser *orientation,
                                                         float values[3]);

Get the current orientation in the box basis set.

orientation :

a VisuUiOrientationChooser widget ;

values :

a location for three floating point values. [array fixed-size=3][out]

visu_ui_orientation_chooser_getOrthoValues ()

void                visu_ui_orientation_chooser_getOrthoValues
                                                        (VisuUiOrientationChooser *orientation,
                                                         float values[3]);

Get the current orientation in the orthogonal basis set.

orientation :

a VisuUiOrientationChooser widget ;

values :

a location for three floating point values. [array fixed-size=3][out]

visu_ui_orientation_chooser_new ()

GtkWidget *         visu_ui_orientation_chooser_new     (VisuUiOrientationChooserKind kind,
                                                         gboolean liveUpdate,
                                                         VisuData *data,
                                                         GtkWindow *parent);

Create a dialog box with three choices to choose a direction in space: the classical orthogonal basis set, the spherical one or the basis set linked to the box. If the data argument is NULL, this last possibility is made unsensitive. If the kind is set to VISU_UI_ORIENTATION_DIRECTION, the orthogonal coordinates correspond exactly to the box coordinates (after transformation) ; whereas kind is VISU_UI_ORIENTATION_NORMAL, the cartesian coordinates are those which give the right normal plane to the direction given in the box coordinates.

kind :

to set the box coordinates behavior ;

liveUpdate :

raise "values-changed" when a value is changed ;

data :

the associated VisuData to get the box definition (can be NULL);. [allow-none]

parent :

give the parent window to set the modal status and the position. [allow-none]

Returns :

a newly created object. [transfer full]

visu_ui_orientation_chooser_setAnglesValues ()

void                visu_ui_orientation_chooser_setAnglesValues
                                                        (VisuUiOrientationChooser *orientation,
                                                         float values[2]);

Change the direction using the one given in a spherical basis set. Update all other values accordingly.

orientation :

a VisuUiOrientationChooser widget ;

values :

two floating point values. [array fixed-size=2]

visu_ui_orientation_chooser_setBoxValues ()

void                visu_ui_orientation_chooser_setBoxValues
                                                        (VisuUiOrientationChooser *orientation,
                                                         float values[3]);

Change the direction using the one given in the box basis set. Update all other values accordingly.

orientation :

a VisuUiOrientationChooser widget ;

values :

three floating point values. [array fixed-size=3]

visu_ui_orientation_chooser_setOrthoValues ()

void                visu_ui_orientation_chooser_setOrthoValues
                                                        (VisuUiOrientationChooser *orientation,
                                                         float values[3]);

Change the direction using the one given in an orthogonal basis set. Update all other values accordingly.

orientation :

a VisuUiOrientationChooser widget ;

values :

three floating point values. [array fixed-size=3]

Signal Details

The "values-changed" signal

void                user_function                      (VisuUiOrientationChooser *chooser,
                                                        gpointer                  user_data)      : Action

This signal is emitted when the values are changed and when the live update checkbox is active.

chooser :

the VisuUiOrientationChooser that emits the signal.

user_data :

user data set when the signal handler was connected.

Since 3.4