Debian Codegraph @

utils/fgpanel/FGInstrumentLayer.hxx

raw symbols SCIP
1 // SPDX-FileCopyrightText: 2000 David Megginson
2 // SPDX-License-Identifier: GPL-2.0-or-later
3
4 #pragma once
5
6 #include <vector>
7 #include <simgear/props/condition.hxx>
8
9 #include "FGPanelTransformation.hxx"
10
11
12 /**
13 * A single layer of a multi-layered instrument.
14 *
15 * Each layer can be subject to a series of transformations based
16 * on current FGFS instrument readings: for example, a texture
17 * representing a needle can rotate to show the airspeed.
18 */
19 class FGInstrumentLayer : public SGConditional {
20 public:
21 FGInstrumentLayer (const int w = -1, const int h = -1);
22 virtual ~FGInstrumentLayer ();
23
24 virtual void draw () = 0;
25 virtual void transform () const;
26
27 virtual int getWidth () const;
28 virtual int getHeight () const;
29 virtual void setWidth (const int w);
30 virtual void setHeight (const int h);
31
32 // Transfer pointer ownership!!
33 // DEPRECATED
34 virtual void addTransformation (FGPanelTransformation * const transformation);
35
36 protected:
37 int m_w, m_h;
38
39 typedef std::vector <FGPanelTransformation *> transformation_list;
40 transformation_list m_transformations;
41 };