]> git.mxchange.org Git - simgear.git/blobdiff - simgear/canvas/CanvasEventManager.hxx
Canvas::Text: add line-height property.
[simgear.git] / simgear / canvas / CanvasEventManager.hxx
index 8ec3cf7e702583f8d5282ec67c58836c7ff13588..efdd0b560ddf395c844acff6e861ca1f46d6f377 100644 (file)
@@ -34,6 +34,10 @@ namespace canvas
                     local_delta;
   };
   typedef std::deque<EventTarget> EventPropagationPath;
+  inline bool operator==(const EventTarget& t1, const EventTarget& t2)
+  {
+    return t1.element.lock() == t2.element.lock();
+  }
 
   class EventManager
   {
@@ -59,15 +63,22 @@ namespace canvas
       // TODO if we really need the paths modify to not copy around the paths
       //      that much.
       StampedPropagationPath _last_mouse_down,
-                             _last_click;
+                             _last_click,
+                             _last_mouse_over;
       size_t _current_click_count;
 
       /**
        * Propagate click event and handle multi-click (eg. create dblclick)
        */
-      void handleClick( const MouseEventPtr& event,
+      bool handleClick( const MouseEventPtr& event,
                         const EventPropagationPath& path );
 
+      /**
+       * Handle mouseover/enter/out/leave
+       */
+      bool handleMove( const MouseEventPtr& event,
+                       const EventPropagationPath& path );
+
       bool propagateEvent( const EventPtr& event,
                            const EventPropagationPath& path );