src/GLViewer/GLViewer_Group.h

Go to the documentation of this file.
00001 //  Copyright (C) 2005 OPEN CASCADE
00002 //
00003 //  This library is free software; you can redistribute it and/or
00004 //  modify it under the terms of the GNU Lesser General Public
00005 //  License as published by the Free Software Foundation; either
00006 //  version 2.1 of the License.
00007 //
00008 //  This library is distributed in the hope that it will be useful,
00009 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 //  Lesser General Public License for more details.
00012 //
00013 //  You should have received a copy of the GNU Lesser General Public
00014 //  License along with this library; if not, write to the Free Software
00015 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 //
00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 //
00019 //  Author : OPEN CASCADE
00020 //
00021 
00022 // File:      GLViewer_Group.h
00023 // Created:   March, 2005
00024 
00025 #ifndef GLVIEWER_GROUP_H
00026 #define GLVIEWER_GROUP_H
00027 
00028 #include <list>
00029 #include "GLViewer.h"
00030 
00031 #ifdef WNT
00032 #pragma warning( disable:4251 )
00033 #endif
00034 
00035 class GLViewer_Object;
00036 
00037 typedef std::list<GLViewer_Object*> OGList;
00038 typedef std::list<GLViewer_Object*>::iterator OGIterator;
00039 
00046 class GLVIEWER_API GLViewer_Group
00047 {
00048 public:
00049   GLViewer_Group();
00050   ~GLViewer_Group();
00051 
00052   bool    isEmpty();
00054   int     count();
00055   
00057   int     contains( GLViewer_Object* );
00058   int     addObject( GLViewer_Object* );
00059   int     removeObject( GLViewer_Object* );
00060 
00061   OGList  getObjects() const { return myList; }
00062 
00064 
00065   void    dragingObjects( float x, float y, bool once = false );
00067   void    updateZoom( GLViewer_Object* sender, float zoom );
00068 
00069 private:
00071   OGList      myList;
00073   int         mySelObjNum;
00074 };
00075 
00076 #endif //GLVIEWER_GROUP_H