]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/util/SGPickCallback.hxx
Tweaks for pick callback cursors.
[simgear.git] / simgear / scene / util / SGPickCallback.hxx
index 90b720f847396d245a4979e144b25b42b1b55942..33ab28adab6e529059ed1d7064eff06da1926966 100644 (file)
 #ifndef SG_SCENE_PICKCALLBACK_HXX
 #define SG_SCENE_PICKCALLBACK_HXX
 
+#include <osg/Vec2d>
+   
 #include <simgear/structure/SGReferenced.hxx>
 #include <simgear/structure/SGSharedPtr.hxx>
 #include <simgear/math/SGMath.hxx>
 
+namespace osgGA { class GUIEventAdapter; }
+
 // Used to implement scenery interaction.
 // The interface is still under development
 class SGPickCallback : public SGReferenced {
@@ -33,7 +37,8 @@ public:
   enum Priority {
     PriorityGUI = 0,
     PriorityPanel = 1,
-    PriorityOther = 2
+    PriorityOther = 2,
+    PriorityScenery = 3
   };
 
   struct Info {
@@ -46,15 +51,30 @@ public:
   { }
 
   virtual ~SGPickCallback() {}
-  virtual bool buttonPressed(int button, const Info& info)
+  virtual bool buttonPressed(int button, const osgGA::GUIEventAdapter* event, const Info& info)
   { return false; }
-  virtual void update(double dt)
+  
+  virtual void update(double dt, int keyModState)
+  { }
+    
+  virtual void buttonReleased(int keyModState)
   { }
-  virtual void buttonReleased(void)
+
+  virtual void mouseMoved(const osgGA::GUIEventAdapter* event)
   { }
 
-  Priority getPriority() const
+  virtual bool hover(const osg::Vec2d& windowPos, const Info& info)
+  {  return false; }
+
+  virtual Priority getPriority() const
   { return _priority; }
+  
+  /**
+   * retrieve the name of the cursor to user when hovering this pickable
+   * object. Mapping is undefined, since SimGear doesn't know about cursors.
+   */
+  virtual std::string getCursor() const
+  { return std::string(); }
 
 private:
   Priority _priority;