1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2013 Robert Osfield
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.
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.
17#include <osgGA/Export>
25/** Base Event class.*/
26class OSGGA_EXPORT Event : public osg::Object
31 Event(const Event& rhs, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
33 META_Object(osgGA, Event);
35 virtual GUIEventAdapter* asGUIEventAdapter() { return 0; }
36 virtual const GUIEventAdapter* asGUIEventAdapter() const { return 0; }
39 /** Set whether this event has been handled by an event handler or not.*/
40 void setHandled(bool handled) const { _handled = handled; }
42 /** Get whether this event has been handled by an event handler or not.*/
43 bool getHandled() const { return _handled; }
46 /** set time in seconds of event. */
47 void setTime(double time) { _time = time; }
49 /** get time in seconds of event. */
50 double getTime() const { return _time; }
55 mutable bool _handled;