Tulip  4.4.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 <string>
26 
27 #include <tulip/tulipconf.h>
28 #include <tulip/Observable.h>
29 
30 namespace tlp {
31 
32 class GlLayer;
33 class GlScene;
34 class GlSimpleEntity;
35 
36 /** \brief An observer to the scene
37  * An observer to the scene who observe layers
38  */
39 class TLP_GL_SCOPE GlSceneEvent : public Event {
40 public:
41 
42  enum GlSceneEventType {TLP_ADDLAYER=0, TLP_DELLAYER, TLP_MODIFYLAYER, TLP_MODIFYENTITY, TLP_DELENTITY};
43 
44  GlSceneEvent(const GlScene &scene,GlSceneEventType sceneEventType,const std::string &layerName,GlLayer *layer);
45 
46  GlSceneEvent(const GlScene &scene, GlSceneEventType sceneEventType, GlSimpleEntity *entity);
47 
48  GlSimpleEntity *getGlSimpleEntity() const;
49 
50  std::string getLayerName() const;
51 
52  GlLayer *getLayer() const;
53 
54  GlSceneEventType getSceneEventType() const;
55 
56 protected :
57 
58  GlSceneEventType sceneEventType;
59  std::string layerName;
60  GlLayer *layer;
61  GlSimpleEntity *glSimpleEntity;
62 
63 };
64 }
65 
66 #endif
67 
68 ///@endcond