+ // Full height of panel.
+ virtual void setHeight (int height) { _height = height; }
+ virtual int getHeight () const { return _height; }
+
+ // X-offset
+ virtual void setXOffset (int offset);
+ virtual int getXOffset () const { return _x_offset->getIntValue(); }
+
+ // Y-offset.
+ virtual void setYOffset (int offset);
+ virtual int getYOffset () const { return _y_offset->getIntValue(); }
+
+ // View height.
+ virtual void setViewHeight (int height) { _view_height = height; }
+ virtual int getViewHeight () const { return _view_height; }
+
+ // Handle a mouse click.
+ virtual bool doMouseAction (int button, int updown, int x, int y);
+ virtual bool doLocalMouseAction(int button, int updown, int x, int y);
+
+ virtual void setDepthTest (bool enable);
+
+ bool getAutohide(void) const { return _autohide; };
+ void setAutohide(bool enable) { _autohide = enable; };
+
+private:
+ void setupVirtualCockpit();
+ void cleanupVirtualCockpit();
+
+ mutable bool _mouseDown;
+ mutable int _mouseButton, _mouseX, _mouseY;
+ mutable int _mouseDelay;
+ mutable FGPanelInstrument * _mouseInstrument;
+ typedef std::vector<FGPanelInstrument *> instrument_list_type;
+ int _width;
+ int _height;
+ int _view_height;
+
+ SGPropertyNode_ptr _visibility;
+ SGPropertyNode_ptr _x_offset;
+ SGPropertyNode_ptr _y_offset;
+ SGPropertyNode_ptr _jitter;
+ SGPropertyNode_ptr _flipx;
+
+ SGConstPropertyNode_ptr _xsize_node;
+ SGConstPropertyNode_ptr _ysize_node;
+
+ osg::ref_ptr<osg::StateSet> _bg;
+ osg::ref_ptr<osg::StateSet> _mbg[8];