X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=src%2FModel%2Fpanelnode.hxx;h=0a6de5c17a9f6fd2a35b12866518405362b378ae;hb=575b3ac98c2aad3fd80375cdfbe49c9180b8788e;hp=f3c75daa636a6f3ed3102bd7995245428a48e15d;hpb=b53cd9c59fcca7d98c24436a1ebfeed981b9634f;p=flightgear.git diff --git a/src/Model/panelnode.hxx b/src/Model/panelnode.hxx index f3c75daa6..0a6de5c17 100644 --- a/src/Model/panelnode.hxx +++ b/src/Model/panelnode.hxx @@ -1,3 +1,7 @@ +#ifndef FG_PANELNODE_HXX +#define FG_PANELNODE_HXX + + #include 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