OpenSceneGraph 3.6.5
Event
Go to the documentation of this file.
1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2013 Robert Osfield
2 *
3 * This library is open source and may be redistributed and/or modified under
4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5 * (at your option) any later version. The full license is in LICENSE file
6 * included with this distribution, and on the openscenegraph.org website.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * OpenSceneGraph Public License for more details.
12*/
13
14#ifndef OSGGA_EVENT
15#define OSGGA_EVENT 1
16
17#include <osgGA/Export>
18#include <osg/Object>
19
20namespace osgGA {
21
22// forward declare
23class GUIEventAdapter;
24
27{
28public:
30
32
34
35 virtual GUIEventAdapter* asGUIEventAdapter() { return 0; }
36 virtual const GUIEventAdapter* asGUIEventAdapter() const { return 0; }
37
38
40 void setHandled(bool handled) const { _handled = handled; }
41
43 bool getHandled() const { return _handled; }
44
45
47 void setTime(double time) { _time = time; }
48
50 double getTime() const { return _time; }
51
52protected:
53 virtual ~Event() {}
54
55 mutable bool _handled;
56 double _time;
57};
58
59}
60
61#endif
The 'GA' in osgGA stands for 'GUI Abstraction'; the osgGA namespace provides facilities to help devel...
Definition Callback:21
Copy Op(erator) used to control whether shallow or deep copy is used during copy construction and clo...
Definition CopyOp:41
@ SHALLOW_COPY
Definition CopyOp:47
Base class/standard interface for objects which require IO support, cloning and reference counting.
Definition Object:61
void setHandled(bool handled) const
Set whether this event has been handled by an event handler or not.
Definition Event:40
Event(const Event &rhs, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
virtual const GUIEventAdapter * asGUIEventAdapter() const
Definition Event:36
virtual ~Event()
Definition Event:53
META_Object(osgGA, Event)
double _time
Definition Event:56
bool getHandled() const
Get whether this event has been handled by an event handler or not.
Definition Event:43
bool _handled
Definition Event:55
virtual GUIEventAdapter * asGUIEventAdapter()
Definition Event:35
double getTime() const
get time in seconds of event.
Definition Event:50
void setTime(double time)
set time in seconds of event.
Definition Event:47
Event class for storing Keyboard, mouse and window events.
Definition GUIEventAdapter:82
#define OSGGA_EXPORT
Definition Export:40

osg logo
Generated at Sun Jul 27 2025 00:00:00 for the OpenSceneGraph by doxygen 1.14.0.