Ajout de l'ensemble du workspace.
[GPU.git] / WCudaMSE / API_Bilat_FreeGlut_Tools / INC / GLUTCallBackTools.h
diff --git a/WCudaMSE/API_Bilat_FreeGlut_Tools/INC/GLUTCallBackTools.h b/WCudaMSE/API_Bilat_FreeGlut_Tools/INC/GLUTCallBackTools.h
new file mode 100755 (executable)
index 0000000..187a4ba
--- /dev/null
@@ -0,0 +1,66 @@
+#ifndef GLUT_CALLBACK_TOOLS_H\r
+#define GLUT_CALLBACK_TOOLS_H\r
+\r
+#include "envFreeGlutTools.h"\r
+#include "GLUTWindowManagers.h"\r
+\r
+#include <map>\r
+using std::map;\r
+\r
+/*\r
+ * But :\r
+ *\r
+ *     Cette class permet d'affecter ses Callback a GLUT.\r
+ *\r
+ *     Exemple :\r
+ *\r
+ *              glutDisplay(displayGLUTWrapper);\r
+ *              glutXXX(xxxGLUTWrapper);\r
+ * Probl�me :\r
+ *\r
+ *     Les m�thodes callback de glut doivent obligatoirement �tre statique. On travail en objet.\r
+ *\r
+ * Solution :\r
+ *\r
+ *     Pour pouvoir "utiliser" les callback glut avec le monde objet, les callback statique appeleront les m�thodes publiques des objets GLUTWindowCustomiser\r
+ *     � l'aide d'une map faisant correspondre l'IdGLUT de la frame � l'objet (GLUTWindowCustomiser) correspondant.\r
+ */\r
+class CBI_FREEGLUT_TOOLS  GLUTCallBackTools\r
+    {\r
+    public:\r
+       virtual ~GLUTCallBackTools();\r
+\r
+       static void affectAllCallBack(map<unsigned int,GLUTWindow*> mapIDGLUTWindow);\r
+\r
+       /*--------------------------------------*\\r
+        |*             Callbacks               *|\r
+        \*-------------------------------------*/\r
+\r
+       /**\r
+        * CallBack pour GLUT\r
+        * glutXXX(xxx)\r
+        */\r
+       static void displayGLUTWrapper();\r
+       static void reshapeGLUTWrapper(int w, int h);\r
+       static void mouseMotionGLUTWrapper(int x, int y);\r
+       static void mouseGLUTWrapper(int button, int state, int x, int y);\r
+       static void mouseWheelWrapper(int wheel, int direction, int x, int y);\r
+       static void keyboardGLUTWrapper(unsigned char key, int x, int y);\r
+       static void specialFuncGLUTWrapper(int key, int x, int y);\r
+       static void windowCloseWrapper();\r
+\r
+       /*--------------------------------------*\\r
+ |*            Get                     *|\r
+        \*-------------------------------------*/\r
+\r
+\r
+       static void idleFuncGLUTWrapper();\r
+\r
+       //static void postRunWrapper();\r
+\r
+    private:\r
+       GLUTCallBackTools();\r
+       static void affectCallBack();\r
+    };\r
+\r
+#endif\r