Salome HOME
0e792efe6fba3ef60b227b8a1f6b9f126c00330c
[modules/gui.git] / src / GLViewer / GLViewer_Group.h
1 // File:      GLViewer_Group.h
2 // Created:   March, 2005
3 // Author:    OCC team
4 // Copyright (C) CEA 2005
5
6 #ifndef GLVIEWER_GROUP_H
7 #define GLVIEWER_GROUP_H
8
9 #include <list>
10 #include "GLViewer.h"
11
12 #ifdef WNT
13 #pragma warning( disable:4251 )
14 #endif
15
16 class GLViewer_Object;
17
18 typedef std::list<GLViewer_Object*> OGList;
19 typedef std::list<GLViewer_Object*>::iterator OGIterator;
20
21 /***************************************************************************
22 **  Class:   GLViewer_Group
23 **  Descr:   Group of GLViewer_Objects
24 **  Module:  GLViewer
25 **  Created: UI team, 25.03.05
26 ****************************************************************************/
27
28 class GLVIEWER_API GLViewer_Group
29 {
30 public:
31   GLViewer_Group();
32   ~GLViewer_Group();
33
34   bool    isEmpty();
35   int     count();
36
37   int     contains( GLViewer_Object* );
38   int     addObject( GLViewer_Object* );
39   int     removeObject( GLViewer_Object* );
40
41   OGList  getObjects() const { return myList; }
42
43   //operations
44   void    dragingObjects( float x, float y, bool once = false );
45   void    updateZoom( GLViewer_Object* sender, float zoom );
46
47 private:
48   OGList      myList;
49   int         mySelObjNum;
50 };
51
52 #endif //GLVIEWER_GROUP_H