![]() |
Tulip
4.6.0
Better Visualization Through Research
|
00001 /* 00002 * 00003 * This file is part of Tulip (www.tulip-software.org) 00004 * 00005 * Authors: David Auber and the Tulip development Team 00006 * from LaBRI, University of Bordeaux 00007 * 00008 * Tulip is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU Lesser General Public License 00010 * as published by the Free Software Foundation, either version 3 00011 * of the License, or (at your option) any later version. 00012 * 00013 * Tulip is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00016 * See the GNU General Public License for more details. 00017 * 00018 */ 00019 ///@cond DOXYGEN_HIDDEN 00020 00021 00022 #ifndef Tulip_GLSCENEOBSERVER_H 00023 #define Tulip_GLSCENEOBSERVER_H 00024 00025 #include <string> 00026 00027 #include <tulip/tulipconf.h> 00028 #include <tulip/Observable.h> 00029 00030 namespace tlp { 00031 00032 class GlLayer; 00033 class GlScene; 00034 class GlSimpleEntity; 00035 00036 /** \brief An observer to the scene 00037 * An observer to the scene who observe layers 00038 */ 00039 class TLP_GL_SCOPE GlSceneEvent : public Event { 00040 public: 00041 00042 enum GlSceneEventType {TLP_ADDLAYER=0, TLP_DELLAYER, TLP_MODIFYLAYER, TLP_MODIFYENTITY, TLP_DELENTITY}; 00043 00044 GlSceneEvent(const GlScene &scene,GlSceneEventType sceneEventType,const std::string &layerName,GlLayer *layer); 00045 00046 GlSceneEvent(const GlScene &scene, GlSceneEventType sceneEventType, GlSimpleEntity *entity); 00047 00048 GlSimpleEntity *getGlSimpleEntity() const; 00049 00050 std::string getLayerName() const; 00051 00052 GlLayer *getLayer() const; 00053 00054 GlSceneEventType getSceneEventType() const; 00055 00056 protected : 00057 00058 GlSceneEventType sceneEventType; 00059 std::string layerName; 00060 GlLayer *layer; 00061 GlSimpleEntity *glSimpleEntity; 00062 00063 }; 00064 } 00065 00066 #endif 00067 00068 ///@endcond