Tulip  4.2.0
Better Visualization Through Research
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Groups Pages
GlSceneObserver.h
1 /*
2  *
3  * This file is part of Tulip (www.tulip-software.org)
4  *
5  * Authors: David Auber and the Tulip development Team
6  * from LaBRI, University of Bordeaux 1 and Inria Bordeaux - Sud Ouest
7  *
8  * Tulip is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU Lesser General Public License
10  * as published by the Free Software Foundation, either version 3
11  * of the License, or (at your option) any later version.
12  *
13  * Tulip is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16  * See the GNU General Public License for more details.
17  *
18  */
19 ///@cond DOXYGEN_HIDDEN
20 
21 
22 #ifndef Tulip_GLSCENEOBSERVER_H
23 #define Tulip_GLSCENEOBSERVER_H
24 
25 #include <set>
26 #include <string>
27 
28 #include <tulip/tulipconf.h>
29 
30 #include <tulip/Observable.h>
31 
32 namespace tlp {
33 
34 class GlLayer;
35 class GlScene;
36 class GlSimpleEntity;
37 
38 /** \brief An observer to the scene
39  * An observer to the scene who observe layers
40  */
41 class TLP_GL_SCOPE GlSceneEvent : public Event {
42 public:
43 
44  enum GlSceneEventType {TLP_ADDLAYER=0, TLP_DELLAYER, TLP_MODIFYLAYER, TLP_MODIFYENTITY, TLP_DELENTITY};
45 
46  GlSceneEvent(const GlScene &scene,GlSceneEventType sceneEventType,const std::string &layerName,GlLayer *layer);
47 
48  GlSceneEvent(const GlScene &scene, GlSceneEventType sceneEventType, GlSimpleEntity *entity);
49 
50  GlSimpleEntity *getGlSimpleEntity() const;
51 
52  std::string getLayerName() const;
53 
54  GlLayer *getLayer() const;
55 
56  GlSceneEventType getSceneEventType() const;
57 
58 protected :
59 
60  GlSceneEventType sceneEventType;
61  std::string layerName;
62  GlLayer *layer;
63  GlSimpleEntity *glSimpleEntity;
64 
65 };
66 }
67 
68 #endif
69 
70 ///@endcond