Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYPaletteGraphic.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 
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(TYElement* pModelerElement = nullptr, GLenum mode = GL_RENDER);
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)
TYPaletteGraphic(TYPalette *pElement)
double getPosY() const
virtual ~TYPaletteGraphic()
void setPosY(double y)
double getHeight() const
double getPosX() const
virtual void display(TYElement *pModelerElement=nullptr, GLenum mode=GL_RENDER)
Classe de definition d'une palette.
Definition: TYPalette.h:41