]> git.mxchange.org Git - flightgear.git/blobdiff - src/Model/panelnode.hxx
Fix line endings
[flightgear.git] / src / Model / panelnode.hxx
index f3c75daa636a6f3ed3102bd7995245428a48e15d..78139bf329b8f24ff6bb9ccc3960b8dfbca165db 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; }
 
@@ -27,7 +39,7 @@ public:
     // even know what many of them do, but they're pure virtual and
     // require implementation.
     //
-    virtual int getNumTriangles() { die(); return 0; }
+    virtual int getNumTriangles() { return 0; }
     virtual void getTriangle(int n, short* v1, short* v2, short* v3) { die(); }
     virtual int getNumLines() { die(); return 0; }
     virtual void getLine(int n, short* v1, short* v2) { die(); }
@@ -68,3 +80,6 @@ private:
     GLfloat _lastProjection[16];
     GLint   _lastViewport[4];
 };
+
+
+#endif // FG_PANELNODE_HXX