Event
Go to the documentation of this file.
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2013 Robert Osfield
*
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
#ifndef OSGGA_EVENT
#define OSGGA_EVENT 1
#include <osgGA/Export>
#include <osg/Object>
namespace osgGA {
// forward declare
class GUIEventAdapter;
class OSGGA_EXPORT Event : public osg::Object
{
public:
Event();
Event(const Event& rhs, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
META_Object(osgGA, Event);
virtual GUIEventAdapter* asGUIEventAdapter() { return 0; }
virtual const GUIEventAdapter* asGUIEventAdapter() const { return 0; }
void setHandled(bool handled) const { _handled = handled; }
bool getHandled() const { return _handled; }
void setTime(double time) { _time = time; }
double getTime() const { return _time; }
protected:
virtual ~Event() {}
mutable bool _handled;
double _time;
};
}
#endif
Object
osgGA::Event::setHandled
void setHandled(bool handled) const
Definition Event:40
osgGA::Event::Event
Event(const Event &rhs, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
osgGA::Event::asGUIEventAdapter
virtual const GUIEventAdapter * asGUIEventAdapter() const
Definition Event:36
osgGA::Event::~Event
virtual ~Event()
Definition Event:53
osgGA::Event::META_Object
META_Object(osgGA, Event)
osgGA::Event::_time
double _time
Definition Event:56
osgGA::Event::getHandled
bool getHandled() const
Definition Event:43
osgGA::Event::_handled
bool _handled
Definition Event:55
osgGA::Event::Event
Event()
osgGA::Event::asGUIEventAdapter
virtual GUIEventAdapter * asGUIEventAdapter()
Definition Event:35
osgGA::Event::getTime
double getTime() const
Definition Event:50
osgGA::Event::setTime
void setTime(double time)
Definition Event:47
osgGA::GUIEventAdapter
Definition GUIEventAdapter:82
osg::CopyOp
Definition CopyOp:41
osg::CopyOp::SHALLOW_COPY
@ SHALLOW_COPY
Definition CopyOp:47
osg::Object
Definition Object:61
osgGA
Definition Callback:21
Export
OSGGA_EXPORT
#define OSGGA_EXPORT
Definition osgGA/Export:40