GUIEventHandler
Go to the documentation of this file.
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 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_GUIEVENTHANDLER
#define OSGGA_GUIEVENTHANDLER 1
#include <vector>
#include <osg/Drawable>
#include <osg/ApplicationUsage>
#include <osgGA/EventHandler>
#include <osgGA/GUIEventAdapter>
#include <osgGA/GUIActionAdapter>
// #define COMPILE_COMPOSITE_EVENTHANDLER
namespace osgGA{
class OSGGA_EXPORT GUIEventHandler : public EventHandler
{
public:
GUIEventHandler() {}
GUIEventHandler(const GUIEventHandler& eh,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY):
osg::Object(eh, copyop),
osg::Callback(eh, copyop),
EventHandler(eh, copyop) {}
META_Object(osgGA,GUIEventHandler);
virtual bool handle(osgGA::Event* event, osg::Object* object, osg::NodeVisitor* nv);
virtual bool handle(const GUIEventAdapter& ea,GUIActionAdapter& aa, osg::Object*, osg::NodeVisitor*) { return handle(ea,aa); }
virtual bool handle(const GUIEventAdapter&,GUIActionAdapter&) { return false; }
protected:
virtual ~GUIEventHandler();
};
}
#endif
ApplicationUsage
Drawable
EventHandler
GUIActionAdapter
GUIEventAdapter
osgGA::EventHandler::event
virtual void event(osg::NodeVisitor *nv, osg::Drawable *drawable)
osgGA::EventHandler::EventHandler
EventHandler()
Definition EventHandler:37
osgGA::Event
Definition Event:27
osgGA::GUIActionAdapter
Definition GUIActionAdapter:62
osgGA::GUIEventAdapter
Definition GUIEventAdapter:82
osgGA::GUIEventHandler::handle
virtual bool handle(const GUIEventAdapter &, GUIActionAdapter &)
Definition GUIEventHandler:68
osgGA::GUIEventHandler::handle
virtual bool handle(const GUIEventAdapter &ea, GUIActionAdapter &aa, osg::Object *, osg::NodeVisitor *)
Definition GUIEventHandler:65
osgGA::GUIEventHandler::GUIEventHandler
GUIEventHandler(const GUIEventHandler &eh, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
Definition GUIEventHandler:54
osgGA::GUIEventHandler::handle
virtual bool handle(osgGA::Event *event, osg::Object *object, osg::NodeVisitor *nv)
osgGA::GUIEventHandler::META_Object
META_Object(osgGA, GUIEventHandler)
osgGA::GUIEventHandler::GUIEventHandler
GUIEventHandler()
Definition GUIEventHandler:53
osgGA::GUIEventHandler::~GUIEventHandler
virtual ~GUIEventHandler()
osg::Callback::Callback
Callback()
Definition Callback:38
osg::CopyOp
Definition CopyOp:41
osg::CopyOp::SHALLOW_COPY
@ SHALLOW_COPY
Definition CopyOp:47
osg::NodeVisitor
Definition NodeVisitor:82
osg::Object
Definition Object:61
osg::Object::Object
Object()
Definition Object:69
osgGA
Definition Callback:21
osg
Definition AlphaFunc:19
OSGGA_EXPORT
#define OSGGA_EXPORT
Definition osgGA/Export:40