]> git.mxchange.org Git - flightgear.git/blobdiff - src/Model/panelnode.hxx
Working at unraveling and breaking dependencies inside of src/Model.
[flightgear.git] / src / Model / panelnode.hxx
index f3c75daa636a6f3ed3102bd7995245428a48e15d..0a6de5c17a9f6fd2a35b12866518405362b378ae 100644 (file)
@@ -1,3 +1,7 @@
+#ifndef FG_PANELNODE_HXX
+#define FG_PANELNODE_HXX
+
+
 #include <plib/ssg.h>
 
 class FGPanel;
@@ -8,6 +12,12 @@ class SGPropertyNode;
 // many methods, mostly involved with modelling and runtime
 // inspection, are unimplemented.
 
+// Static mouse handler for all FGPanelNodes.  Very clumsy; this
+// should really be done through our container (an aircraft model,
+// typically).
+bool fgHandle3DPanelMouseEvent(int button, int updown, int x, int y);
+void fgUpdate3DPanels();
+
 class FGPanelNode : public ssgLeaf 
 {
 protected:
@@ -18,7 +28,9 @@ public:
     virtual ~FGPanelNode();
 
     virtual void draw();
-    void mouseEvent(int button, int updown, int x, int y);
+    bool doMouseAction(int button, int updown, int x, int y);
+
+    FGPanel* getPanel() { return _panel; }
 
     virtual void recalcBSphere() { bsphere_is_invalid = 0; }
 
@@ -68,3 +80,6 @@ private:
     GLfloat _lastProjection[16];
     GLint   _lastViewport[4];
 };
+
+
+#endif // FG_PANELNODE_HXX