gtk_orientationChooser

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

Synopsis

#include <coreTools/toolMatrix.h>

#define             ORIENTATION_CHOOSER_TYPE
#define             ORIENTATION_CHOOSER                 (obj)
#define             ORIENTATION_CHOOSER_CLASS           (klass)
#define             IS_ORIENTATION_CHOOSER              (obj)
#define             IS_ORIENTATION_CHOOSER_CLASS        (klass)
                    OrientationChooser;
                    OrientationChooserClass;
enum                OrientationChooserKind;
GType               orientationChooser_get_type         (void);
GtkWidget*          orientationChooserNew               (OrientationChooserKind kind,
                                                         gboolean liveUpdate,
                                                         VisuData *data,
                                                         GtkWindow *parent);
void                orientationChooserSet_orthoValues   (OrientationChooser *orientation,
                                                         float values[3]);
void                orientationChooserSet_boxValues     (OrientationChooser *orientation,
                                                         float values[3]);
void                orientationChooserSet_anglesValues  (OrientationChooser *orientation,
                                                         float values[2]);
void                orientationChooserGet_orthoValues   (OrientationChooser *orientation,
                                                         float values[3]);
void                orientationChooserGet_boxValues     (OrientationChooser *orientation,
                                                         float values[3]);
void                orientationChooserGet_anglesValues  (OrientationChooser *orientation,
                                                         float values[2]);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBin
                                 +----GtkWindow
                                       +----GtkDialog
                                             +----OrientationChooser

Implemented Interfaces

OrientationChooser implements AtkImplementorIface and GtkBuildable.

Signals

  "values-changed"                                 : Run First / 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

ORIENTATION_CHOOSER_TYPE

#define ORIENTATION_CHOOSER_TYPE         (orientationChooser_get_type ())

Return the associated GType to the OrientationChooser objects.


ORIENTATION_CHOOSER()

#define ORIENTATION_CHOOSER(obj)         (G_TYPE_CHECK_INSTANCE_CAST ((obj), ORIENTATION_CHOOSER_TYPE, OrientationChooser))

Cast the given object to a OrientationChooser object.

obj :

the widget to cast.

ORIENTATION_CHOOSER_CLASS()

#define ORIENTATION_CHOOSER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ORIENTATION_CHOOSER_TYPE, OrientationChooserClass))

Cast the given class to a OrientationChooserClass object.

klass :

the class to cast.

IS_ORIENTATION_CHOOSER()

#define IS_ORIENTATION_CHOOSER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ORIENTATION_CHOOSER_TYPE))

Return if the given object is a valid OrientationChooser object.

obj :

the object to test.

IS_ORIENTATION_CHOOSER_CLASS()

#define IS_ORIENTATION_CHOOSER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ORIENTATION_CHOOSER_TYPE))

Return if the given class is a valid OrientationChooserClass class.

klass :

the class to test.

OrientationChooser

typedef struct _OrientationChooser OrientationChooser;

Short form for a OrientationChooser_struct structure.


OrientationChooserClass

typedef struct _OrientationChooserClass OrientationChooserClass;

Short form for a OrientationChooserClass_struct structure.


enum OrientationChooserKind

typedef enum
  {
    orientationChooser_direction,
    orientationChooser_normal
  } OrientationChooserKind;

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

orientationChooser_direction

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

orientationChooser_normal

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

orientationChooser_get_type ()

GType               orientationChooser_get_type         (void);

GType are unique numbers to identify objects.

Returns :

the GType associated with OrientationChooser objects.

orientationChooserNew ()

GtkWidget*          orientationChooserNew               (OrientationChooserKind 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 orientationChooser_direction, the orthogonal coordinates correspond exactly to the box coordinates (after transformation) ; whereas kind is orientationChooser_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) ;

parent :

give the parent window to set the modal status and the position.

Returns :

a newly created object.

orientationChooserSet_orthoValues ()

void                orientationChooserSet_orthoValues   (OrientationChooser *orientation,
                                                         float values[3]);

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

orientation :

a OrientationChooser widget ;

values :

three floating point values.

orientationChooserSet_boxValues ()

void                orientationChooserSet_boxValues     (OrientationChooser *orientation,
                                                         float values[3]);

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

orientation :

a OrientationChooser widget ;

values :

three floating point values.

orientationChooserSet_anglesValues ()

void                orientationChooserSet_anglesValues  (OrientationChooser *orientation,
                                                         float values[2]);

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

orientation :

a OrientationChooser widget ;

values :

two floating point values.

orientationChooserGet_orthoValues ()

void                orientationChooserGet_orthoValues   (OrientationChooser *orientation,
                                                         float values[3]);

Get the current orientation in the orthogonal basis set.

orientation :

a OrientationChooser widget ;

values :

a location for three floating point values.

orientationChooserGet_boxValues ()

void                orientationChooserGet_boxValues     (OrientationChooser *orientation,
                                                         float values[3]);

Get the current orientation in the box basis set.

orientation :

a OrientationChooser widget ;

values :

a location for three floating point values.

orientationChooserGet_anglesValues ()

void                orientationChooserGet_anglesValues  (OrientationChooser *orientation,
                                                         float values[2]);

Get the current orientation in the spherical basis set.

orientation :

a OrientationChooser widget ;

values :

a location for two floating point values.

Signal Details

The "values-changed" signal

void                user_function                      (OrientationChooser *chooser,
                                                        gpointer            user_data)      : Run First / Action

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

chooser :

the OrientationChooser that emits the signal.

user_data :

user data set when the signal handler was connected.

Since 3.4