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