Tulip 5.7.1
Large graphs analysis and drawing
Loading...
Searching...
No Matches
GlSceneObserver.h
1/*
2 *
3 * This file is part of Tulip (https://tulip.labri.fr)
4 *
5 * Authors: David Auber and the Tulip development Team
6 * from LaBRI, University of Bordeaux
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#ifndef Tulip_GLSCENEOBSERVER_H
22#define Tulip_GLSCENEOBSERVER_H
23
24#include <string>
25
26#include <tulip/tulipconf.h>
27#include <tulip/Observable.h>
28
29namespace tlp {
30
31class GlLayer;
32class GlScene;
33class GlSimpleEntity;
34
35/** \brief An observer to the scene
36 * An observer to the scene who observe layers
37 */
38class TLP_GL_SCOPE GlSceneEvent : public Event {
39public:
40 enum GlSceneEventType {
41 TLP_ADDLAYER = 0,
42 TLP_DELLAYER,
43 TLP_MODIFYLAYER,
44 TLP_MODIFYENTITY,
45 TLP_DELENTITY
46 };
47
48 GlSceneEvent(const GlScene &scene, GlSceneEventType sceneEventType, const std::string &layerName,
49 GlLayer *layer);
50
51 GlSceneEvent(const GlScene &scene, GlSceneEventType sceneEventType, GlSimpleEntity *entity);
52
53 GlSimpleEntity *getGlSimpleEntity() const;
54
55 std::string getLayerName() const;
56
57 GlLayer *getLayer() const;
58
59 GlSceneEventType getSceneEventType() const;
60
61protected:
62 GlSceneEventType sceneEventType;
63 std::string layerName;
64 GlLayer *layer;
65 GlSimpleEntity *glSimpleEntity;
66};
67} // namespace tlp
68
69#endif
70
71///@endcond