+ // transfer pointer ownership!!!
+ virtual void addInstrument (FGPanelInstrument * instrument);
+
+ // Background texture.
+ virtual void setBackground (ssgTexture * texture);
+
+ // Background multiple textures.
+ virtual void setMultiBackground (ssgTexture * texture, int idx);
+
+ // Make the panel visible or invisible.
+ virtual bool getVisibility () const;
+ virtual void setVisibility (bool visibility);
+
+ // Full width of panel.
+ virtual void setWidth (int width) { _width = width; }
+ virtual int getWidth () const { return _width; }
+
+ // 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);
+
+private:
+ void setupVirtualCockpit();
+ void cleanupVirtualCockpit();
+
+ mutable bool _mouseDown;
+ mutable int _mouseButton, _mouseX, _mouseY;
+ mutable int _mouseDelay;
+ mutable FGPanelInstrument * _mouseInstrument;
+ typedef vector<FGPanelInstrument *> instrument_list_type;
+ int _width;
+ int _height;
+ int _view_height;
+
+ SGPropertyNode * _visibility;
+ SGPropertyNode * _x_offset;
+ SGPropertyNode * _y_offset;
+ SGPropertyNode * _jitter;
+ SGPropertyNode * _flipx;
+
+ const SGPropertyNode * _xsize_node;
+ const SGPropertyNode * _ysize_node;
+
+ ssgTexture * _bg;
+ ssgTexture * _mbg[8];
+ // List of instruments in panel.
+ instrument_list_type _instruments;