OpendTect-6_4  6.4
visevent.h
Go to the documentation of this file.
1 #ifndef visevent_h
2 #define visevent_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Kristofer Tingdahl
9  Date: 4-11-2002
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 #include "visbasemod.h"
17 #include "keyenum.h"
18 #include "visdata.h"
19 #include "visosg.h"
20 #include "position.h"
21 #include "trigonometry.h"
22 
23 class TabletInfo;
24 class Timer;
25 
26 namespace osg { class Node; }
27 
28 
29 namespace visBase
30 {
31 
37 class EventCatchHandler;
38 class Detail;
39 
40 
43 
45 {
46 public:
47  EventInfo();
48  EventInfo(const EventInfo&);
49 
50  ~EventInfo();
51  EventInfo& operator=(const EventInfo&);
52 
54 
56 
58 
63  double pickdepth;
65 
66  bool pressed;
70  bool dragging;
72 
75 
77 
78  Coord3 displaypickedpos; // display space
79  Coord3 localpickedpos; // object space
80  Coord3 worldpickedpos; // world space
81 
83  void setTabletInfo(const TabletInfo*);
84 };
85 
86 
88 {
89  friend class EventCatchHandler;
90 
91 public:
92 
93  static EventCatcher* create()
95 
96  void setEventType( int type );
97  int eventType() const { return type_; }
98 
99  void releaseEventsPostOsg( bool yn );
106 
107  bool isHandled() const;
108  void setHandled();
109  void reHandle(const EventInfo&);
110 
111  void setUtm2Display(ObjectSet<Transformation>&);
112 
113 protected:
114  ~EventCatcher();
115 
116  void releaseEventsCB(CallBacker*);
117 
118  int type_;
120 
121  static const char* eventtypestr();
122 
126 
127  osg::Node* osgnode_;
128  EventCatchHandler* eventcatchhandler_;
129 
134 };
135 
136 }; // Namespace
137 
138 
139 #endif
bool eventreleasepostosg_
Definition: visevent.h:132
#define mExpClass(module)
Definition: commondefs.h:160
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
Definition: visevent.h:41
TabletInfo * tabletinfo
Definition: visevent.h:82
A lock of a type that (hopefully) suits your needs. To use it, you need the Locker class...
Definition: threadlock.h:53
Line3 mouseline
Definition: visevent.h:59
DataObject is the base class off all objects that are used in Visualization and ought to be shared in...
Definition: visdata.h:65
Definition: visevent.h:41
TypeSet< int > pickedobjids
Definition: visevent.h:76
CNotifier< EventCatcher, const EventInfo & > eventhappened
Definition: visevent.h:104
ObjectSet< Transformation > utm2display_
Definition: visevent.h:119
static EventCatcher * create()
Definition: visevent.h:93
bool rehandling_
Definition: visevent.h:124
Definition: visevent.h:41
A cartesian coordinate in 2D space.
Definition: coord.h:25
CNotifier< EventCatcher, const EventInfo & > nothandled
Definition: visevent.h:105
A Line3 is a line in space, with the following equations:
Definition: trigonometry.h:441
Definition: mouseevent.h:23
bool pressed
Definition: visevent.h:66
double pickdepth
Mouseline parameter value of picked pos.
Definition: visevent.h:63
Set of pointers to objects.
Definition: commontypes.h:32
ButtonState
Definition: keyenum.h:20
Coord3 localpickedpos
Definition: visevent.h:79
Threads::Lock eventqueuelock_
Definition: visevent.h:131
ObjectSet< EventInfo > eventqueue_
Definition: visevent.h:130
Coord3 worldpickedpos
Definition: visevent.h:80
Definition: visevent.h:42
bool ishandled_
Definition: visevent.h:123
Timer * eventreleasetimer_
Definition: visevent.h:133
int type_
Definition: visevent.h:118
A cartesian coordinate in 3D space.
Definition: coord.h:72
Definition: visannot.h:43
bool dragging
Only set if type == MouseMovement.
Definition: visevent.h:70
EventType type
Definition: visevent.h:53
OD::KeyboardKey key_
Only set if type == Keyboard.
Definition: visevent.h:73
Coord mousepos
Definition: visevent.h:57
bool rehandled_
Definition: visevent.h:125
Open Scene Graph.
Definition: visannot.h:29
Definition: visevent.h:44
KeyboardKey
Definition: keyenum.h:35
EventCatchHandler * eventcatchhandler_
Definition: visevent.h:128
Notifier with automatic capsule creation.
Definition: callback.h:395
#define mCreateDataObj(clss)
Definition: visdata.h:209
Coord3 displaypickedpos
Definition: visevent.h:78
Timer class.
Definition: timer.h:25
osg::Node * osgnode_
Definition: visevent.h:127
EventType
Definition: visevent.h:41
OD::ButtonState buttonstate_
Definition: visevent.h:55
Definition: visevent.h:87
Definition: visevent.h:41

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019