Salome HOME
95c2b55f5d11bbae7afcf95adc5f3fdc821997cc
[modules/gui.git] / src / GLViewer / GLViewer_BaseDrawers.h
1 // Copyright (C) 2007-2023  CEA, EDF, 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, or (at your option) any later version.
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
23 //  Author : OPEN CASCADE
24 // File:      GLViewer_BaseDrawers.h
25 // Created:   November, 2004
26 //
27 #ifndef GLVIEWER_BASEDRAWERS_H
28 #define GLVIEWER_BASEDRAWERS_H
29
30 class QColor;
31
32 #include "GLViewer.h"
33 #include "GLViewer_Drawer.h"
34
35 class GLViewer_AspectLine;
36
37 #ifdef WIN32
38 #pragma warning( disable:4251 )
39 #endif
40
41 /*! 
42   \class GLViewer_MarkerDrawer
43   Drawer for GLViewer_MarkerSet
44 */
45
46 class GLVIEWER_API GLViewer_MarkerDrawer : public GLViewer_Drawer  
47 {
48 public:
49   GLViewer_MarkerDrawer();
50   ~GLViewer_MarkerDrawer();
51   
52   //! Redefined method
53   virtual void       create( float, float, bool );
54   
55 private:
56   //! Draws marker in point (x,y) of \param radius with \param color and \param aspect
57   void               drawMarker( float& x, float& y, float& radius, QColor& color, GLViewer_AspectLine* aspect );
58 };
59
60 /*!
61   \class  GLViewer_PolylineDrawer
62   Drawer for GLViewer_Polyline
63 */
64
65 class GLVIEWER_API GLViewer_PolylineDrawer : public GLViewer_Drawer  
66 {
67 public:
68   GLViewer_PolylineDrawer();
69   ~GLViewer_PolylineDrawer();
70   //! Redefined method
71   virtual void       create( float, float, bool );    
72 };
73
74 /*!
75    \class GLViewer_TextDrawer
76    Drawer for GLViewer_Text
77 */
78
79 class GLVIEWER_API GLViewer_TextDrawer: public GLViewer_Drawer
80 {
81   
82 public:
83   GLViewer_TextDrawer();
84   ~GLViewer_TextDrawer();
85   
86   //! Redefined method
87   virtual void              create( float, float, bool );
88   //! Updates objects after updating font
89   void                      updateObjects();
90 };
91
92 #ifdef WIN32
93 #pragma warning ( default:4251 )
94 #endif
95
96 #endif