Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYPanelGraphic.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) <2012> <EDF-R&D> <FRANCE>
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License as published by
5  * the Free Software Foundation; either version 2 of the License, or
6  * (at your option) any later version.
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10  * See the GNU General Public License for more details.
11  * You should have received a copy of the GNU General Public License along
12  * with this program; if not, write to the Free Software Foundation, Inc.,
13  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
14  */
15 
24 #ifndef __TY_PANEL_GRAPHIC__
25 #define __TY_PANEL_GRAPHIC__
26 
27 #if _MSC_VER > 1000
28  #pragma once
29 #endif // _MSC_VER > 1000
30 
32 #include "TYElementGraphic.h"
33 
34 class TYPanel;
35 
41 {
43 
44  // Methodes
45 public:
46  TYPanelGraphic(TYPanel* pElement);
47  virtual ~TYPanelGraphic();
48 
49  virtual void update(bool force = false);
50 
58  virtual void display(TYElement* pModelerElement = nullptr, GLenum mode = GL_RENDER);
59 
63  double getPosX() const
64  {
65  return _posX;
66  }
67 
71  void setPosX(double x)
72  {
73  _posX = x;
74  }
75 
79  double getPosY() const
80  {
81  return _posY;
82  }
83 
87  void setPosY(double y)
88  {
89  _posY = y;
90  }
91 
95  double getWidth() const
96  {
97  return _width;
98  }
99 
103  void setWidth(double width)
104  {
105  _width = width;
106  }
107 
111  double getHeight() const
112  {
113  return _height;
114  }
115 
119  void setHeight(double height)
120  {
121  _height = height;
122  }
123 
128  {
129  return _backColor;
130  }
131 
135  void setBackColor(const OColor& backColor)
136  {
137  _backColor = backColor;
138  }
139 
144  {
145  return _fontColor;
146  }
147 
151  void setFontColor(const OColor& fontColor)
152  {
153  _fontColor = fontColor;
154  }
155 
156 protected:
157  // Font
159 
160  // Position
161  double _posX;
162  double _posY;
163 
164  // Taille du panel
165  double _width;
166  double _height;
167 
168  // couleur du panel
170 
171  // couleur du texte
173 };
174 
175 #endif // __TY_PANEL_GRAPHIC__
Representation graphique d'un element de base (fichier header)
#define TY_DECL_METIER_GRAPHIC(classname)
Definition: color.h:31
classe graphique pour un element de base
classe graphique pour un panel d'informations
void setHeight(double height)
TYPanelGraphic(TYPanel *pElement)
virtual void update(bool force=false)
double getHeight() const
void setPosY(double y)
void setFontColor(const OColor &fontColor)
double getPosY() const
void setWidth(double width)
virtual ~TYPanelGraphic()
void setBackColor(const OColor &backColor)
double getWidth() const
void setPosX(double x)
OColor getBackColor() const
double getPosX() const
OColor getFontColor() const
virtual void display(TYElement *pModelerElement=nullptr, GLenum mode=GL_RENDER)
Classe de definition d'un panel d'information.
Definition: TYPanel.h:34