1 #ifndef GLUT_CALLBACK_TOOLS_H
2 #define GLUT_CALLBACK_TOOLS_H
4 #include "envFreeGlutTools.h"
5 #include "GLUTWindowManagers.h"
13 * Cette class permet d'affecter ses Callback a GLUT.
17 * glutDisplay(displayGLUTWrapper);
18 * glutXXX(xxxGLUTWrapper);
21 * Les m�thodes callback de glut doivent obligatoirement �tre statique. On travail en objet.
25 * Pour pouvoir "utiliser" les callback glut avec le monde objet, les callback statique appeleront les m�thodes publiques des objets GLUTWindowCustomiser
26 * � l'aide d'une map faisant correspondre l'IdGLUT de la frame � l'objet (GLUTWindowCustomiser) correspondant.
28 class CBI_FREEGLUT_TOOLS GLUTCallBackTools
31 virtual ~GLUTCallBackTools();
33 static void affectAllCallBack(map
<unsigned int,GLUTWindow
*> mapIDGLUTWindow
);
35 /*--------------------------------------*\
37 \*-------------------------------------*/
43 static void displayGLUTWrapper();
44 static void reshapeGLUTWrapper(int w
, int h
);
45 static void mouseMotionGLUTWrapper(int x
, int y
);
46 static void mouseGLUTWrapper(int button
, int state
, int x
, int y
);
47 static void mouseWheelWrapper(int wheel
, int direction
, int x
, int y
);
48 static void keyboardGLUTWrapper(unsigned char key
, int x
, int y
);
49 static void specialFuncGLUTWrapper(int key
, int x
, int y
);
50 static void windowCloseWrapper();
52 /*--------------------------------------*\
54 \*-------------------------------------*/
57 static void idleFuncGLUTWrapper();
59 //static void postRunWrapper();
63 static void affectCallBack();