Salome HOME
8c451efbac51641561693a8561fca44e97737ff6
[modules/gui.git] / src / GLViewer / GLViewer_BaseDrawers.h
1 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 //  This library is free software; you can redistribute it and/or
7 //  modify it under the terms of the GNU Lesser General Public
8 //  License as published by the Free Software Foundation; either
9 //  version 2.1 of the License.
10 //
11 //  This library is distributed in the hope that it will be useful,
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 //  Lesser General Public License for more details.
15 //
16 //  You should have received a copy of the GNU Lesser General Public
17 //  License along with this library; if not, write to the Free Software
18 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 //  Author : OPEN CASCADE
23 // File:      GLViewer_BaseDrawers.h
24 // Created:   November, 2004
25 //
26 #ifndef GLVIEWER_BASEDRAWERS_H
27 #define GLVIEWER_BASEDRAWERS_H
28
29 class QColor;
30
31 #include "GLViewer.h"
32 #include "GLViewer_Drawer.h"
33
34 class GLViewer_AspectLine;
35
36 #ifdef WIN32
37 #pragma warning( disable:4251 )
38 #endif
39
40 /*! 
41   \class GLViewer_MarkerDrawer
42   Drawer for GLViewer_MarkerSet
43 */
44
45 class GLVIEWER_API GLViewer_MarkerDrawer : public GLViewer_Drawer  
46 {
47 public:
48   GLViewer_MarkerDrawer();
49   ~GLViewer_MarkerDrawer();
50   
51   //! Redefined method
52   virtual void       create( float, float, bool );
53   
54 private:
55   //! Draws marker in point (x,y) of \param radius with \param color and \param aspect
56   void               drawMarker( float& x, float& y, float& radius, QColor& color, GLViewer_AspectLine* aspect );
57 };
58
59 /*!
60   \class  GLViewer_PolylineDrawer
61   Drawer for GLViewer_Polyline
62 */
63
64 class GLVIEWER_API GLViewer_PolylineDrawer : public GLViewer_Drawer  
65 {
66 public:
67   GLViewer_PolylineDrawer();
68   ~GLViewer_PolylineDrawer();
69   //! Redefined method
70   virtual void       create( float, float, bool );    
71 };
72
73 /*!
74    \class GLViewer_TextDrawer
75    Drawer for GLViewer_Text
76 */
77
78 class GLVIEWER_API GLViewer_TextDrawer: public GLViewer_Drawer
79 {
80   
81 public:
82   GLViewer_TextDrawer();
83   ~GLViewer_TextDrawer();
84   
85   //! Redefined method
86   virtual void              create( float, float, bool );
87   //! Updates objects after updating font
88   void                      updateObjects();
89 };
90
91 #ifdef WIN32
92 #pragma warning ( default:4251 )
93 #endif
94
95 #endif