-// Abstract base class for a panel instrument.
-//
-// A panel instrument consists of zero or more actions, associated
-// with mouse clicks in rectangular areas. Currently, the only
-// concrete class derived from this is FGLayeredInstrument, but others
-// may show up in the future (some complex instruments could be
-// entirely hand-coded, for example).
-////////////////////////////////////////////////////////////////////////
-
-class FGPanelInstrument
-{
-public:
- FGPanelInstrument ();
- FGPanelInstrument (int x, int y, int w, int h);
- virtual ~FGPanelInstrument ();
-
- virtual void draw () = 0;
-
- virtual void setPosition(int x, int y);
- virtual void setSize(int w, int h);
-
- virtual int getXPos () const;
- virtual int getYPos () const;
- virtual int getWidth () const;
- virtual int getHeight () const;
-
- // Coordinates relative to centre.
- // Transfer pointer ownership!!
- virtual void addAction (FGPanelAction * action);
-
- // Coordinates relative to centre.
- virtual bool doMouseAction (int button, int x, int y);
-
-protected:
- int _x, _y, _w, _h;
- typedef vector<FGPanelAction *> action_list_type;
- action_list_type _actions;
-};
-
-
-\f
-////////////////////////////////////////////////////////////////////////
-// Abstract base class for an instrument layer.
-//
-// The FGLayeredInstrument class builds up instruments by using layers
-// of textures or text. Each layer can have zero or more
-// transformations applied to it: for example, a needle layer can
-// rotate to show the altitude or airspeed.