Blender  V2.59
MyGlutKeyHandler.h
Go to the documentation of this file.
00001 
00029 #ifndef NAN_INCLUDED_MyGlutKeyHandler_h
00030 #define NAN_INCLUDED_MyGlutKeyHandler_h
00031 
00032 #include "../common/GlutKeyboardManager.h"
00033 
00034 class MyGlutKeyHandler : public GlutKeyboardHandler
00035 {
00036 public :
00037         static
00038                 MyGlutKeyHandler *
00039         New(
00040         ) {
00041                 MEM_SmartPtr<MyGlutKeyHandler> output = new MyGlutKeyHandler();
00042 
00043                 if (output == NULL
00044                 ) {
00045                         return NULL;
00046                 }
00047                 return output.Release();
00048                 
00049         }       
00050 
00051                 void
00052         HandleKeyboard(
00053                 unsigned char key,
00054                 int x,
00055                 int y
00056         ){
00057 
00058                 switch (key) {
00059 
00060                         case 27 :
00061 
00062                                 exit(0);
00063                 }       
00064         }
00065                 
00066         ~MyGlutKeyHandler(
00067         ) 
00068         {
00069         };
00070 
00071 private :
00072 
00073         MyGlutKeyHandler(
00074         )
00075         {
00076         }
00077 
00078 };
00079 
00080 #endif
00081