]> Creatis software - cpPlugins.git/blobdiff - lib/cpExtensions/Interaction/BaseStyle.h
...
[cpPlugins.git] / lib / cpExtensions / Interaction / BaseStyle.h
index 0a70dea38c90319ae1394fba9d3a62caa43cc982..cee70784d10734a05b54616b5c25c4de5d8dc4c8 100644 (file)
@@ -2,16 +2,9 @@
 #define __cpExtensions__Interaction__BaseStyle__h__
 
 #include <cpExtensions/Config.h>
-#include <cpExtensions/Utility.h>
 #include <vtkInteractorStyle.h>
 #include <map>
 
-/* =========================================================================
- * Double click algorithm inspired from:
- * http://www.autohotkey.com/board/topic/56493-easiest-way-to-detect-double-clicks/
- * =========================================================================
- */
-
 // -------------------------------------------------------------------------
 #define cpExtensions_BaseStyle_Commands( C )                            \
   protected:                                                            \
@@ -156,28 +149,33 @@ namespace cpExtensions
           }
         inline void Release( )
           {
-            long c = cpExtensions_CHRONO;
-            this->m_LastButtonUp = c;
-            this->m_LastButtonHeld = c - this->m_LastButtonDown;
-            this->m_LastButtonDown = -1;
+            /* TODO
+               long c = cpExtensions_CHRONO;
+               this->m_LastButtonUp = c;
+               this->m_LastButtonHeld = c - this->m_LastButtonDown;
+               this->m_LastButtonDown = -1;
+            */
           }
         inline unsigned char Clicks( )
           {
-            unsigned char n = 0;
-            long c = cpExtensions_CHRONO;
-            if(
-              this->m_LastButtonHeld < MaxDoubleClick &&
-              ( c - this->m_LastButtonUp ) < MaxDoubleClick
-              )
-            {
-              this->Reset( );
-              n = 2;
-            }
-            else
-              n = 1;
-            if( this->m_LastButtonDown < 0 )
-              this->m_LastButtonDown = c;
-            return( n );
+            /* TODO
+               unsigned char n = 0;
+               long c = cpExtensions_CHRONO;
+               if(
+               this->m_LastButtonHeld < MaxDoubleClick &&
+               ( c - this->m_LastButtonUp ) < MaxDoubleClick
+               )
+               {
+               this->Reset( );
+               n = 2;
+               }
+               else
+               n = 1;
+               if( this->m_LastButtonDown < 0 )
+               this->m_LastButtonDown = c;
+               return( n );
+            */
+            return( 1 );
           }
       };
       _TMouseButtonEvent m_LeftButtonEvent;