- // Legacy interface from old panel.
- static FGPanel * OurPanel;
- virtual float get_height () const;
- virtual void ReInit (int x, int y, int finx, int finy);
- virtual void Update () const;
+ // Update the panel (every frame).
+ virtual void init ();
+ virtual void bind ();
+ virtual void unbind ();
+ virtual void draw ();
+ virtual void update (double dt);
+ virtual void update (GLfloat winx, GLfloat winw, GLfloat winy, GLfloat winh);
+
+ virtual void updateMouseDelay();
+
+ // 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);