Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYPaletteGraphic.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) <2012-2024> <EDF-DTG> <FRANCE>
3  * This file is part of Code_TYMPAN (R).
4  * Code_TYMPAN (R) is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  * Code_TYMPAN (R) is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11  * See the GNU General Public License for more details.
12  * You should have received a copy of the GNU General Public License along
13  * with Code_TYMPAN (R). If not, see <https://www.gnu.org/licenses/>.
14  */
15 
27 #ifndef __TY_PALETTE_GRAPHIC__
28 #define __TY_PALETTE_GRAPHIC__
29 
30 #if _MSC_VER > 1000
31  #pragma once
32 #endif // _MSC_VER > 1000
33 
35 #include "TYElementGraphic.h"
36 
37 class TYPalette;
38 
44 {
46 
47  // Methodes
48 public:
49  TYPaletteGraphic(TYPalette* pElement);
50  virtual ~TYPaletteGraphic();
51 
52  virtual void update(bool force = false);
53 
61  virtual void display(TYRenderContext& renderContext);
62 
66  double getPosX() const
67  {
68  return _posX;
69  }
70 
74  void setPosX(double x)
75  {
76  _posX = x;
77  }
78 
82  double getPosY() const
83  {
84  return _posY;
85  }
86 
90  void setPosY(double y)
91  {
92  _posY = y;
93  }
94 
98  double getWidth() const
99  {
100  return _width;
101  }
102 
106  void setWidth(double width)
107  {
108  _width = width;
109  }
110 
114  double getHeight() const
115  {
116  return _height;
117  }
118 
122  void setHeight(double height)
123  {
124  _height = height;
125  }
126 
127 protected:
128  // Font
130 
131  // Position
132  double _posX;
133  double _posY;
134 
135  // Taille de la barre
136  double _width;
137  double _height;
138 };
139 
140 #endif // __TY_PALETTE_GRAPHIC__
Representation graphique d'un element de base (fichier header)
#define TY_DECL_METIER_GRAPHIC(classname)
classe graphique pour un element de base
Classe graphique pour representer une palette.
virtual void update(bool force=false)
double getWidth() const
void setHeight(double height)
void setPosX(double x)
void setWidth(double width)
virtual void display(TYRenderContext &renderContext)
TYPaletteGraphic(TYPalette *pElement)
double getPosY() const
virtual ~TYPaletteGraphic()
void setPosY(double y)
double getHeight() const
double getPosX() const
Classe de definition d'une palette.
Definition: TYPalette.h:41