OpendTect  6.6
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  RCS: $Id$
10 ________________________________________________________________________
11 
12 
13 -*/
14 
15 #include "visbasemod.h"
16 #include "keyenum.h"
17 #include "visdata.h"
18 #include "visosg.h"
19 #include "position.h"
20 #include "trigonometry.h"
21 
22 class TabletInfo;
23 class Timer;
24 
25 namespace osg { class Node; }
26 
27 
28 namespace visBase
29 {
30 
36 class EventCatchHandler;
37 class Detail;
38 
39 
42 
44 {
45 public:
48 
51 
53 
55 
57 
62  double pickdepth;
64 
65  bool pressed;
69  bool dragging;
71 
74 
76 
77  Coord3 displaypickedpos; // display space
78  Coord3 localpickedpos; // object space
79  Coord3 worldpickedpos; // world space
80 
82  void setTabletInfo(const TabletInfo*);
83 };
84 
85 
87 {
88  friend class EventCatchHandler;
89 
90 public:
91 
92  static EventCatcher* create()
94 
95  void setEventType( int type );
96  int eventType() const { return type_; }
97 
98  void releaseEventsPostOsg( bool yn );
105 
106  bool isHandled() const;
107  void setHandled();
108  void reHandle(const EventInfo&);
109 
111 
112 protected:
114 
116 
117  int type_;
119 
120  static const char* eventtypestr();
121 
125 
126  osg::Node* osgnode_;
127  EventCatchHandler* eventcatchhandler_;
128 
133 };
134 
135 }; // Namespace
136 
137 
visosg.h
Coord3
A cartesian coordinate in 3D space.
Definition: coord.h:72
visBase::EventInfo::~EventInfo
~EventInfo()
visBase::EventCatcher::osgnode_
osg::Node * osgnode_
Definition: visevent.h:126
visBase::EventCatcher::isHandled
bool isHandled() const
visBase::EventCatcher::utm2display_
ObjectSet< Transformation > utm2display_
Definition: visevent.h:118
visBase::EventCatcher::create
static EventCatcher * create()
Definition: visevent.h:92
visBase::EventCatcher::releaseEventsCB
void releaseEventsCB(CallBacker *)
ObjectSet
Set of pointers to objects.
Definition: commontypes.h:31
visBase::EventCatcher::nothandled
CNotifier< EventCatcher, const EventInfo & > nothandled
Definition: visevent.h:104
visBase::EventCatcher::reHandle
void reHandle(const EventInfo &)
visBase
Definition: visannot.h:43
visBase::EventInfo::key_
OD::KeyboardKey key_
Only set if type == Keyboard.
Definition: visevent.h:72
visBase::EventInfo::type
EventType type
Definition: visevent.h:52
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
visBase::EventInfo::tabletinfo
TabletInfo * tabletinfo
Definition: visevent.h:81
visBase::EventCatcher::releaseEventsPostOsg
void releaseEventsPostOsg(bool yn)
osg
Open Scene Graph.
Definition: visannot.h:29
visBase::DataObject
DataObject is the base class off all objects that are used in Visualization and ought to be shared in...
Definition: visdata.h:63
visBase::EventInfo::displaypickedpos
Coord3 displaypickedpos
Definition: visevent.h:77
visBase::EventCatcher::eventtypestr
static const char * eventtypestr()
visBase::EventCatcher
Definition: visevent.h:87
visBase::EventInfo::dragging
bool dragging
Only set if type == MouseMovement.
Definition: visevent.h:69
CallBacker
Inherit from this class to be able to send and/or receive CallBacks.
Definition: callback.h:185
OD::ButtonState
ButtonState
Definition: keyenum.h:20
keyenum.h
visBase::EventCatcher::eventqueue_
ObjectSet< EventInfo > eventqueue_
Definition: visevent.h:129
visBase::EventCatcher::eventhappened
CNotifier< EventCatcher, const EventInfo & > eventhappened
Definition: visevent.h:103
Timer
Timer class.
Definition: timer.h:25
visBase::MouseDoubleClick
@ MouseDoubleClick
Definition: visevent.h:41
visBase::MouseMovement
@ MouseMovement
Definition: visevent.h:40
visBase::EventInfo::EventInfo
EventInfo(const EventInfo &)
Coord
A cartesian coordinate in 2D space.
Definition: coord.h:25
visBase::EventCatcher::rehandling_
bool rehandling_
Definition: visevent.h:123
visBase::EventCatcher::~EventCatcher
~EventCatcher()
visBase::EventCatcher::type_
int type_
Definition: visevent.h:117
visBase::EventInfo::operator=
EventInfo & operator=(const EventInfo &)
visBase::EventInfo
Definition: visevent.h:44
visBase::EventInfo::mouseline
Line3 mouseline
Definition: visevent.h:58
visBase::EventInfo::mousepos
Coord mousepos
Definition: visevent.h:56
visBase::EventCatcher::eventreleasetimer_
Timer * eventreleasetimer_
Definition: visevent.h:132
visBase::EventInfo::pickedobjids
TypeSet< int > pickedobjids
Definition: visevent.h:75
visBase::EventCatcher::eventqueuelock_
Threads::Lock eventqueuelock_
Definition: visevent.h:130
visBase::EventCatcher::rehandled_
bool rehandled_
Definition: visevent.h:124
Line3
A Line3 is a line in space, with the following equations:
Definition: trigonometry.h:441
visBase::EventInfo::pickdepth
double pickdepth
Mouseline parameter value of picked pos.
Definition: visevent.h:62
position.h
visdata.h
visBase::EventCatcher::ishandled_
bool ishandled_
Definition: visevent.h:122
trigonometry.h
visBase::Keyboard
@ Keyboard
Definition: visevent.h:40
TabletInfo
Definition: mouseevent.h:23
mCreateDataObj
#define mCreateDataObj(clss)
Definition: visdata.h:214
visBase::EventInfo::buttonstate_
OD::ButtonState buttonstate_
Definition: visevent.h:54
visBase::EventInfo::localpickedpos
Coord3 localpickedpos
Definition: visevent.h:78
visBase::EventCatcher::setHandled
void setHandled()
visBase::MouseClick
@ MouseClick
Definition: visevent.h:40
visBase::EventCatcher::eventreleasepostosg_
bool eventreleasepostosg_
Definition: visevent.h:131
OD::KeyboardKey
KeyboardKey
Definition: keyenum.h:35
visBase::EventCatcher::eventcatchhandler_
EventCatchHandler * eventcatchhandler_
Definition: visevent.h:127
visBase::EventCatcher::setUtm2Display
void setUtm2Display(ObjectSet< Transformation > &)
visBase::EventInfo::worldpickedpos
Coord3 worldpickedpos
Definition: visevent.h:79
visBase::Any
@ Any
Definition: visevent.h:40
visBase::EventInfo::EventInfo
EventInfo()
Threads::Lock
A lock of a type that (hopefully) suits your needs. To use it, you need the Locker class.
Definition: threadlock.h:53
visBase::EventInfo::pressed
bool pressed
Definition: visevent.h:65
CNotifier
Notifier with automatic capsule creation.
Definition: notify.h:171
visBase::EventInfo::setTabletInfo
void setTabletInfo(const TabletInfo *)
visBase::EventType
EventType
Definition: visevent.h:40
TypeSet< int >

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