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

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