diff --git a/VisualStudio/osgGA/osgGA.dsp b/VisualStudio/osgGA/osgGA.dsp index 0bd81291b..2c5baa4a0 100755 --- a/VisualStudio/osgGA/osgGA.dsp +++ b/VisualStudio/osgGA/osgGA.dsp @@ -183,10 +183,6 @@ SOURCE=..\..\src\osgGA\GUIEventHandler.cpp # End Source File # Begin Source File -SOURCE=..\..\src\osgGA\GUIEventHandlerVisitor.cpp -# End Source File -# Begin Source File - SOURCE=..\..\src\osgGA\KeySwitchMatrixManipulator.cpp # End Source File # Begin Source File @@ -195,10 +191,6 @@ SOURCE=..\..\src\osgGA\MatrixManipulator.cpp # End Source File # Begin Source File -SOURCE=..\..\src\osgGA\SetSceneViewVisitor.cpp -# End Source File -# Begin Source File - SOURCE=..\..\src\osgGA\SimpleViewer.cpp # End Source File # Begin Source File @@ -267,10 +259,6 @@ SOURCE=..\..\Include\osgGA\GUIEventHandler # End Source File # Begin Source File -SOURCE=..\..\Include\osgGA\GUIEventHandlerVisitor -# End Source File -# Begin Source File - SOURCE=..\..\Include\osgGA\KeySwitchMatrixManipulator # End Source File # Begin Source File @@ -279,10 +267,6 @@ SOURCE=..\..\Include\osgGA\MatrixManipulator # End Source File # Begin Source File -SOURCE=..\..\Include\osgGA\SetSceneViewVisitor -# End Source File -# Begin Source File - SOURCE=..\..\Include\osgGA\SimpleViewer # End Source File # Begin Source File diff --git a/VisualStudio/osgWrappers/osgGA/wrapper_osgGA.dsp b/VisualStudio/osgWrappers/osgGA/wrapper_osgGA.dsp index d479a584f..d03de979a 100644 --- a/VisualStudio/osgWrappers/osgGA/wrapper_osgGA.dsp +++ b/VisualStudio/osgWrappers/osgGA/wrapper_osgGA.dsp @@ -128,7 +128,7 @@ SOURCE=..\..\..\src\osgWrappers\osgGA\GUIEventHandler.cpp # End Source File # Begin Source File -SOURCE=..\..\..\src\osgWrappers\osgGA\GUIEventHandlerVisitor.cpp +SOURCE=..\..\..\src\osgWrappers\osgGA\GraphicsWindow.cpp # End Source File # Begin Source File @@ -143,10 +143,6 @@ SOURCE=..\..\..\src\osgWrappers\osgGA\MatrixManipulator.cpp SOURCE=..\..\..\src\osgWrappers\osgGA\NodeTrackerManipulator.cpp # End Source File -# Begin Source File -SOURCE=..\..\..\src\osgWrappers\osgGA\SetSceneViewVisitor.cpp -# End Source File - # Begin Source File SOURCE=..\..\..\src\osgWrappers\osgGA\SimpleViewer.cpp # End Source File diff --git a/include/osgGA/GUIEventHandler b/include/osgGA/GUIEventHandler index 954b05476..436d91138 100644 --- a/include/osgGA/GUIEventHandler +++ b/include/osgGA/GUIEventHandler @@ -23,14 +23,12 @@ #include #include #include -#include + + +// #define COMPILE_COMPOSITE_EVENTHANDLER namespace osgGA{ -class CompositeGUIEventHandler; - - - /** GUIEventHandler provides a basic interface for any class which wants to handle @@ -64,91 +62,25 @@ public: /** Event traversal drawable callback method.*/ virtual void event(osg::NodeVisitor* nv, osg::Drawable* drawable); - - /** Returns 0 if this GUIEventHandler is not a CompositeGUIEventHandler. */ - virtual const CompositeGUIEventHandler* getComposite() const { return 0; } - - /** Returns 0 if this GUIEventHandler is not a CompositeGUIEventHandler. */ - virtual CompositeGUIEventHandler* getComposite() { return 0; } - /** Handle events, return true if handled, false otherwise. */ virtual bool handle(const GUIEventAdapter& ea,GUIActionAdapter& aa, osg::Object*, osg::NodeVisitor*) { return handle(ea,aa); } /** deprecated, Handle events, return true if handled, false otherwise. */ virtual bool handle(const GUIEventAdapter&,GUIActionAdapter&) { return false; } - - /** Accept visits from GUIEventHandler visitors */ - virtual void accept(GUIEventHandlerVisitor&) {} /** Get the keyboard and mouse usage of this manipulator.*/ virtual void getUsage(osg::ApplicationUsage&) const {} }; +#ifdef USE_DEPRECATED_API + // keep for backwards compatibility + class GUIEventHandlerVisitor + { + public: -/** -CompositeGUIEventHandler allows GUIEventHandlers to be composed into hierarchies. -*/ - -class OSGGA_EXPORT CompositeGUIEventHandler : public GUIEventHandler -{ -public: - - typedef std::vector< osg::ref_ptr > ChildList; - - virtual const char* className() const { return "CompositeGUIEventHandler"; } - - virtual const CompositeGUIEventHandler* getComposite() const { return this; } - - virtual CompositeGUIEventHandler* getComposite() { return this; } - - virtual bool handle(const GUIEventAdapter& ea,GUIActionAdapter& aa, osg::Object* object, osg::NodeVisitor* nv); - - virtual void accept(GUIEventHandlerVisitor& v) { v.visit(*this); } - - /** Get the keyboard and mouse usage of this manipulator.*/ - virtual void getUsage(osg::ApplicationUsage& usage) const; - - - // Composite-specific methods below - - virtual bool addChild(GUIEventHandler *geh); - - virtual bool removeChild(GUIEventHandler *geh); - - unsigned int getNumChildren() const { return _children.size(); } - - GUIEventHandler *getChild( unsigned int i) { return _children[i].get(); } - - const GUIEventHandler *getChild( unsigned int i ) const { return _children[i].get(); } - - bool containsNode( const GUIEventHandler* node ) const - { - for (ChildList::const_iterator itr=_children.begin(); - itr!=_children.end(); - ++itr) - { - if (itr->get()==node) return true; - } - return false; - } - - ChildList::iterator findChild( const GUIEventHandler* node ) - { - for (ChildList::iterator itr=_children.begin(); - itr!=_children.end(); - ++itr) - { - if (itr->get()==node) return itr; - } - return _children.end(); - } - -private: - - ChildList _children; - -}; - + void visit(GUIEventHandler&) {} + }; +#endif } diff --git a/include/osgGA/GUIEventHandlerVisitor b/include/osgGA/GUIEventHandlerVisitor deleted file mode 100644 index c5d9ba075..000000000 --- a/include/osgGA/GUIEventHandlerVisitor +++ /dev/null @@ -1,70 +0,0 @@ -/* -*-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_GUIEVENTHANDLERVISITOR -#define OSGGA_GUIEVENTHANDLERVISITOR 1 - -#include -#include -#include - -namespace osgGA{ - -// Some forward declarations -class GUIActionAdapter; -class GUIEventHandler; -class CompositeGUIEventHandler; -class MatrixManipulator; -class StateSetManipulator; - -/** -Base class for visiting GUIEventHandlers. - -A Default Visitor, (Might want to make it an Extrinsic Visitor at some point). -By default, it does nothing to the things it visits. Sub classes of this Visitor -need only override visit operations for the types of object they're interested in. - -*/ - - -class OSGGA_EXPORT GUIEventHandlerVisitor -{ - public: - - virtual void visit(GUIEventHandler&) {} - virtual void visit(CompositeGUIEventHandler&); - virtual void visit(MatrixManipulator&) {}; - virtual void visit(StateSetManipulator&) {}; - - // Accessors - - /** Get the GUI EventAdapter associated with this GUIEventHandlerVisitor */ - const GUIEventAdapter *getGUIEventAdapter() { return _gea.get(); } - - /** Get the GUI Action Adapter associated with this GEH Visitor */ - GUIActionAdapter *getGUIActionAdapter() { return _gaa; } - - protected: - - GUIEventHandlerVisitor(GUIEventAdapter* in, GUIActionAdapter* out):_gea(in),_gaa(out) {} - virtual ~GUIEventHandlerVisitor() {} - - private: - - osg::ref_ptr _gea; - GUIActionAdapter* _gaa; // Just a pointer. NOT owned by this object. - -}; - -} - -#endif diff --git a/include/osgGA/KeySwitchMatrixManipulator b/include/osgGA/KeySwitchMatrixManipulator index 2f0427ac3..4643021cf 100644 --- a/include/osgGA/KeySwitchMatrixManipulator +++ b/include/osgGA/KeySwitchMatrixManipulator @@ -17,7 +17,6 @@ #include #include #include -#include namespace osgGA{ diff --git a/include/osgGA/MatrixManipulator b/include/osgGA/MatrixManipulator index e1947759b..313a92a55 100644 --- a/include/osgGA/MatrixManipulator +++ b/include/osgGA/MatrixManipulator @@ -181,9 +181,6 @@ public: /** Handle events, return true if handled, false otherwise. */ virtual bool handle(const GUIEventAdapter& ea,GUIActionAdapter& us); - /** Handle visitations */ - virtual void accept(GUIEventHandlerVisitor& v) { v.visit(*this); } - protected: MatrixManipulator(); diff --git a/include/osgGA/SetSceneViewVisitor b/include/osgGA/SetSceneViewVisitor deleted file mode 100644 index 4158b8ea3..000000000 --- a/include/osgGA/SetSceneViewVisitor +++ /dev/null @@ -1,54 +0,0 @@ -/* -*-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_SETSCENEVIEWGEHVISITOR -#define OSGGA_SETSCENEVIEWGEHVISITOR 1 - -#include -#include - -namespace osgGA{ - -// Some forward declarations -class GUIEventHandler; -class MatrixManipulator; - -/** -SetSceneViewGUIEventHandlerVisitor which visits various types of -GUIEventHandler and sets them up appropriately, given a new scene -view. -*/ -class OSGGA_EXPORT SetSceneViewVisitor: public GUIEventHandlerVisitor -{ - public: - - SetSceneViewVisitor(GUIEventAdapter* in, - GUIActionAdapter* out, - osgUtil::SceneView* sv): - GUIEventHandlerVisitor(in,out), - _sceneView(sv) {} - - virtual ~SetSceneViewVisitor() {} - - virtual void visit(MatrixManipulator& cm); - virtual void visit(StateSetManipulator& cm); - - private: - - osg::ref_ptr _sceneView; - -}; - -}; - -#endif diff --git a/include/osgGA/StateSetManipulator b/include/osgGA/StateSetManipulator index b8156b235..a68b78cf3 100644 --- a/include/osgGA/StateSetManipulator +++ b/include/osgGA/StateSetManipulator @@ -11,8 +11,8 @@ * OpenSceneGraph Public License for more details. */ -#ifndef OSGGA_GEOSTATE_MANIPULATOR -#define OSGGA_GEOSTATE_MANIPULATOR 1 +#ifndef OSGGA_STATESTATE_MANIPULATOR +#define OSGGA_STATESTATE_MANIPULATOR 1 #include #include @@ -38,21 +38,18 @@ public: virtual const char* className() const { return "StateSetManipulator"; } - /** attach a geostate to the manipulator to be used for specifying view.*/ + /** attach a STATESTATE to the manipulator to be used for specifying view.*/ virtual void setStateSet(osg::StateSet*); - /** get the attached a geostate.*/ + /** get the attached a STATESTATE.*/ virtual osg::StateSet * getStateSet(); - /** get the attached a geostate.*/ + /** get the attached a STATESTATE.*/ virtual const osg::StateSet * getStateSet() const; /** Handle events, return true if handled, false otherwise.*/ virtual bool handle(const GUIEventAdapter& ea,GUIActionAdapter& us); - /** Handle visitations */ - virtual void accept(GUIEventHandlerVisitor&); - /** Get the keyboard and mouse usage of this manipulator.*/ virtual void getUsage(osg::ApplicationUsage& usage) const; @@ -75,7 +72,7 @@ public: protected: - // Reference pointer to a geostate + // Reference pointer to a STATESTATE osg::ref_ptr _drawState; bool _backface; diff --git a/include/osgProducer/ViewerEventHandler b/include/osgProducer/ViewerEventHandler index fb949c5cd..8dc197c48 100644 --- a/include/osgProducer/ViewerEventHandler +++ b/include/osgProducer/ViewerEventHandler @@ -27,8 +27,6 @@ class OSGPRODUCER_EXPORT ViewerEventHandler : public osgGA::GUIEventHandler virtual bool handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& aa); - virtual void accept(osgGA::GUIEventHandlerVisitor& gehv); - /** Get the keyboard and mouse usage of this manipulator.*/ virtual void getUsage(osg::ApplicationUsage& usage) const; diff --git a/src/osgGA/GNUmakefile b/src/osgGA/GNUmakefile index 24a2cec71..f580580d4 100644 --- a/src/osgGA/GNUmakefile +++ b/src/osgGA/GNUmakefile @@ -12,9 +12,7 @@ CXXFILES = \ EventQueue.cpp\ GUIEventAdapter.cpp\ GUIEventHandler.cpp\ - GUIEventHandlerVisitor.cpp\ KeySwitchMatrixManipulator.cpp\ - SetSceneViewVisitor.cpp\ StateSetManipulator.cpp\ SimpleViewer.cpp\ TerrainManipulator.cpp\ diff --git a/src/osgGA/GUIEventHandler.cpp b/src/osgGA/GUIEventHandler.cpp index bd4963b0a..ba5f0b855 100644 --- a/src/osgGA/GUIEventHandler.cpp +++ b/src/osgGA/GUIEventHandler.cpp @@ -49,52 +49,3 @@ void GUIEventHandler::event(osg::NodeVisitor* nv, osg::Drawable* drawable) } } -void CompositeGUIEventHandler::getUsage(osg::ApplicationUsage& usage) const -{ - for (ChildList::const_iterator itr=_children.begin(); - itr!=_children.end(); - ++itr) - { - (*itr)->getUsage(usage); - } -} - -bool CompositeGUIEventHandler::handle(const GUIEventAdapter& ea,GUIActionAdapter& aa, osg::Object* object, osg::NodeVisitor* nv) -{ - bool result=false; - - for (ChildList::iterator itr=_children.begin(); - itr!=_children.end(); - ++itr) - { - result |= (*itr)->handle(ea, aa, object, nv); - } - return result; -} - - -bool CompositeGUIEventHandler::addChild(GUIEventHandler *child) -{ - if (child && !containsNode(child)) - { - // note ref_ptr<> automatically handles incrementing child's reference count. - _children.push_back(child); - return true; - } - else return false; - -} - -bool CompositeGUIEventHandler::removeChild(GUIEventHandler *child) -{ - ChildList::iterator itr = findChild(child); - if (itr!=_children.end()) - { - // note ref_ptr<> automatically handles decrementing child's reference count. - _children.erase(itr); - - return true; - } - else return false; - -} diff --git a/src/osgGA/GUIEventHandlerVisitor.cpp b/src/osgGA/GUIEventHandlerVisitor.cpp deleted file mode 100644 index 7d55ebc5b..000000000 --- a/src/osgGA/GUIEventHandlerVisitor.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include -#include - -void osgGA::GUIEventHandlerVisitor::visit(osgGA::CompositeGUIEventHandler& cgeh) -{ - for(unsigned int i=0; iaccept(*this); - } -} diff --git a/src/osgGA/SetSceneViewVisitor.cpp b/src/osgGA/SetSceneViewVisitor.cpp deleted file mode 100644 index fd41240c7..000000000 --- a/src/osgGA/SetSceneViewVisitor.cpp +++ /dev/null @@ -1,16 +0,0 @@ -#include -#include -#include - -void osgGA::SetSceneViewVisitor::visit(osgGA::MatrixManipulator& cm) -{ - cm.setNode(_sceneView->getSceneData()); - cm.setByInverseMatrix(_sceneView->getViewMatrix()); - cm.init(*getGUIEventAdapter(),*getGUIActionAdapter()); - cm.home(*getGUIEventAdapter(),*getGUIActionAdapter()); -} - -void osgGA::SetSceneViewVisitor::visit(osgGA::StateSetManipulator& ssm) -{ - ssm.setStateSet(_sceneView->getGlobalStateSet()); -} diff --git a/src/osgGA/StateSetManipulator.cpp b/src/osgGA/StateSetManipulator.cpp index 93a433aaa..352729214 100644 --- a/src/osgGA/StateSetManipulator.cpp +++ b/src/osgGA/StateSetManipulator.cpp @@ -113,10 +113,6 @@ void StateSetManipulator::getUsage(osg::ApplicationUsage& usage) const usage.addKeyboardMouseBinding("w","Toggle polygon fill mode between fill, line (wire frame) and points"); } -void StateSetManipulator::accept(GUIEventHandlerVisitor& gehv) -{ - gehv.visit(*this); -} void StateSetManipulator::setBackfaceEnabled(bool newbackface) { diff --git a/src/osgProducer/ViewerEventHandler.cpp b/src/osgProducer/ViewerEventHandler.cpp index febeb3db8..5b86f1ee0 100644 --- a/src/osgProducer/ViewerEventHandler.cpp +++ b/src/osgProducer/ViewerEventHandler.cpp @@ -1258,10 +1258,12 @@ bool ViewerEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActio } +#ifdef COMPILE_COMPOSITE_EVENTHANDLER void ViewerEventHandler::accept(osgGA::GUIEventHandlerVisitor& gehv) { gehv.visit(*this); } +#endif void ViewerEventHandler::getUsage(osg::ApplicationUsage& usage) const { diff --git a/src/osgWrappers/osg/Drawable.cpp b/src/osgWrappers/osg/Drawable.cpp index 24d0ad4fe..01b8987f7 100644 --- a/src/osgWrappers/osg/Drawable.cpp +++ b/src/osgWrappers/osg/Drawable.cpp @@ -217,7 +217,6 @@ BEGIN_OBJECT_REFLECTOR(osg::Drawable::DrawCallback) I_Method0(const char *, className); I_Method2(void, drawImplementation, IN, osg::State &, x, IN, const osg::Drawable *, x); I_Method2(void, drawImplementation, IN, osg::RenderInfo &, renderInfo, IN, const osg::Drawable *, drawable); - I_MethodWithDefaults1(void, releaseGLObjects, IN, osg::State *, x, 0); END_REFLECTOR BEGIN_OBJECT_REFLECTOR(osg::Drawable::EventCallback) diff --git a/src/osgWrappers/osg/NodeCallback.cpp b/src/osgWrappers/osg/NodeCallback.cpp index 45e4fbc56..18a4ad7cf 100644 --- a/src/osgWrappers/osg/NodeCallback.cpp +++ b/src/osgWrappers/osg/NodeCallback.cpp @@ -15,7 +15,6 @@ #include #include #include -#include // Must undefine IN and OUT macros defined in Windows headers #ifdef IN @@ -40,7 +39,6 @@ BEGIN_OBJECT_REFLECTOR(osg::NodeCallback) I_Method0(const osg::NodeCallback *, getNestedCallback); I_Method1(void, addNestedCallback, IN, osg::NodeCallback *, nc); I_Method1(void, removeNestedCallback, IN, osg::NodeCallback *, nc); - I_MethodWithDefaults1(void, releaseGLObjects, IN, osg::State *, x, 0); I_Property(osg::NodeCallback *, NestedCallback); I_PublicMemberProperty(osg::ref_ptr< osg::NodeCallback >, _nestedCallback); END_REFLECTOR diff --git a/src/osgWrappers/osgGA/GNUmakefile b/src/osgWrappers/osgGA/GNUmakefile index d3a16a6b5..7436037d1 100644 --- a/src/osgWrappers/osgGA/GNUmakefile +++ b/src/osgWrappers/osgGA/GNUmakefile @@ -10,11 +10,10 @@ CXXFILES =\ GUIActionAdapter.cpp\ GUIEventAdapter.cpp\ GUIEventHandler.cpp\ - GUIEventHandlerVisitor.cpp\ + GraphicsWindow.cpp\ KeySwitchMatrixManipulator.cpp\ MatrixManipulator.cpp\ NodeTrackerManipulator.cpp\ - SetSceneViewVisitor.cpp\ SimpleViewer.cpp\ StateSetManipulator.cpp\ TerrainManipulator.cpp\ diff --git a/src/osgWrappers/osgGA/GUIEventHandler.cpp b/src/osgWrappers/osgGA/GUIEventHandler.cpp index 78d8a1eb9..da1e6391a 100644 --- a/src/osgWrappers/osgGA/GUIEventHandler.cpp +++ b/src/osgWrappers/osgGA/GUIEventHandler.cpp @@ -19,7 +19,6 @@ #include #include #include -#include // Must undefine IN and OUT macros defined in Windows headers #ifdef IN @@ -29,28 +28,6 @@ #undef OUT #endif -TYPE_NAME_ALIAS(std::vector< osg::ref_ptr< osgGA::GUIEventHandler > >, osgGA::CompositeGUIEventHandler::ChildList); - -BEGIN_OBJECT_REFLECTOR(osgGA::CompositeGUIEventHandler) - I_BaseType(osgGA::GUIEventHandler); - I_Constructor0(); - I_Method0(const char *, className); - I_Method0(const osgGA::CompositeGUIEventHandler *, getComposite); - I_Method0(osgGA::CompositeGUIEventHandler *, getComposite); - I_Method4(bool, handle, IN, const osgGA::GUIEventAdapter &, ea, IN, osgGA::GUIActionAdapter &, aa, IN, osg::Object *, object, IN, osg::NodeVisitor *, nv); - I_Method1(void, accept, IN, osgGA::GUIEventHandlerVisitor &, v); - I_Method1(void, getUsage, IN, osg::ApplicationUsage &, usage); - I_Method1(bool, addChild, IN, osgGA::GUIEventHandler *, geh); - I_Method1(bool, removeChild, IN, osgGA::GUIEventHandler *, geh); - I_Method0(unsigned int, getNumChildren); - I_Method1(osgGA::GUIEventHandler *, getChild, IN, unsigned int, i); - I_Method1(const osgGA::GUIEventHandler *, getChild, IN, unsigned int, i); - I_Method1(bool, containsNode, IN, const osgGA::GUIEventHandler *, node); - I_Method1(osgGA::CompositeGUIEventHandler::ChildList::iterator, findChild, IN, const osgGA::GUIEventHandler *, node); - I_ArrayProperty_GA(osgGA::GUIEventHandler *, Child, Children, unsigned int, bool); - I_ReadOnlyProperty(osgGA::CompositeGUIEventHandler *, Composite); -END_REFLECTOR - BEGIN_OBJECT_REFLECTOR(osgGA::GUIEventHandler) I_BaseType(osg::NodeCallback); I_BaseType(osg::Drawable::EventCallback); @@ -62,25 +39,13 @@ BEGIN_OBJECT_REFLECTOR(osgGA::GUIEventHandler) I_Method0(const char *, libraryName); I_Method0(const char *, className); I_Method2(void, event, IN, osg::NodeVisitor *, nv, IN, osg::Drawable *, drawable); - I_Method0(const osgGA::CompositeGUIEventHandler *, getComposite); - I_Method0(osgGA::CompositeGUIEventHandler *, getComposite); I_Method4(bool, handle, IN, const osgGA::GUIEventAdapter &, ea, IN, osgGA::GUIActionAdapter &, aa, IN, osg::Object *, x, IN, osg::NodeVisitor *, x); I_Method2(bool, handle, IN, const osgGA::GUIEventAdapter &, x, IN, osgGA::GUIActionAdapter &, x); - I_Method1(void, accept, IN, osgGA::GUIEventHandlerVisitor &, x); I_Method1(void, getUsage, IN, osg::ApplicationUsage &, x); - I_ReadOnlyProperty(osgGA::CompositeGUIEventHandler *, Composite); END_REFLECTOR -BEGIN_VALUE_REFLECTOR(osg::ref_ptr< osgGA::GUIEventHandler >) +BEGIN_VALUE_REFLECTOR(osgGA::GUIEventHandlerVisitor) I_Constructor0(); - I_Constructor1(IN, osgGA::GUIEventHandler *, ptr); - I_Constructor1(IN, const osg::ref_ptr< osgGA::GUIEventHandler > &, rp); - I_Method0(osgGA::GUIEventHandler *, get); - I_Method0(bool, valid); - I_Method0(osgGA::GUIEventHandler *, release); - I_Method1(void, swap, IN, osg::ref_ptr< osgGA::GUIEventHandler > &, rp); - I_ReadOnlyProperty(osgGA::GUIEventHandler *, ); + I_Method1(void, visit, IN, osgGA::GUIEventHandler &, x); END_REFLECTOR -STD_VECTOR_REFLECTOR(std::vector< osg::ref_ptr< osgGA::GUIEventHandler > >); - diff --git a/src/osgWrappers/osgGA/GUIEventHandlerVisitor.cpp b/src/osgWrappers/osgGA/GUIEventHandlerVisitor.cpp deleted file mode 100644 index 5057f4e61..000000000 --- a/src/osgWrappers/osgGA/GUIEventHandlerVisitor.cpp +++ /dev/null @@ -1,38 +0,0 @@ -// *************************************************************************** -// -// Generated automatically by genwrapper. -// Please DO NOT EDIT this file! -// -// *************************************************************************** - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -// Must undefine IN and OUT macros defined in Windows headers -#ifdef IN -#undef IN -#endif -#ifdef OUT -#undef OUT -#endif - -BEGIN_OBJECT_REFLECTOR(osgGA::GUIEventHandlerVisitor) - I_Method1(void, visit, IN, osgGA::GUIEventHandler &, x); - I_Method1(void, visit, IN, osgGA::CompositeGUIEventHandler &, x); - I_Method1(void, visit, IN, osgGA::MatrixManipulator &, x); - I_Method1(void, visit, IN, osgGA::StateSetManipulator &, x); - I_Method0(const osgGA::GUIEventAdapter *, getGUIEventAdapter); - I_Method0(osgGA::GUIActionAdapter *, getGUIActionAdapter); - I_ReadOnlyProperty(osgGA::GUIActionAdapter *, GUIActionAdapter); - I_ReadOnlyProperty(const osgGA::GUIEventAdapter *, GUIEventAdapter); -END_REFLECTOR - diff --git a/src/osgWrappers/osgGA/GraphicsWindow.cpp b/src/osgWrappers/osgGA/GraphicsWindow.cpp new file mode 100644 index 000000000..27286b4a9 --- /dev/null +++ b/src/osgWrappers/osgGA/GraphicsWindow.cpp @@ -0,0 +1,44 @@ +// *************************************************************************** +// +// Generated automatically by genwrapper. +// Please DO NOT EDIT this file! +// +// *************************************************************************** + +#include +#include +#include +#include + +#include +#include +#include + +// Must undefine IN and OUT macros defined in Windows headers +#ifdef IN +#undef IN +#endif +#ifdef OUT +#undef OUT +#endif + +BEGIN_OBJECT_REFLECTOR(osgGA::GraphicsWindow) + I_BaseType(osg::GraphicsContext); + I_BaseType(osgGA::GUIActionAdapter); + I_Constructor0(); + I_Method1(void, setEventQueue, IN, osgGA::EventQueue *, eventQueue); + I_Method0(osgGA::EventQueue *, getEventQueue); + I_Method0(const osgGA::EventQueue *, getEventQueue); + I_Method0(bool, realizeImplementation); + I_Method0(bool, isRealizedImplementation); + I_Method0(void, closeImplementation); + I_Method0(void, makeCurrentImplementation); + I_Method1(void, makeContextCurrentImplementation, IN, osg::GraphicsContext *, x); + I_Method1(void, bindPBufferToTextureImplementation, IN, GLenum, x); + I_Method0(void, swapBuffersImplementation); + I_Method0(void, requestRedraw); + I_MethodWithDefaults1(void, requestContinuousUpdate, IN, bool, x, true); + I_Method2(void, requestWarpPointer, IN, float, x, IN, float, x); + I_Property(osgGA::EventQueue *, EventQueue); +END_REFLECTOR + diff --git a/src/osgWrappers/osgGA/MatrixManipulator.cpp b/src/osgWrappers/osgGA/MatrixManipulator.cpp index fb45c780d..cf4742263 100644 --- a/src/osgWrappers/osgGA/MatrixManipulator.cpp +++ b/src/osgWrappers/osgGA/MatrixManipulator.cpp @@ -16,7 +16,6 @@ #include #include #include -#include #include #include @@ -60,7 +59,6 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osgGA::MatrixManipulator) I_Method1(void, home, IN, double, x); I_Method2(void, init, IN, const osgGA::GUIEventAdapter &, x, IN, osgGA::GUIActionAdapter &, x); I_Method2(bool, handle, IN, const osgGA::GUIEventAdapter &, ea, IN, osgGA::GUIActionAdapter &, us); - I_Method1(void, accept, IN, osgGA::GUIEventHandlerVisitor &, v); I_Property(bool, AutoComputeHomePosition); I_WriteOnlyProperty(const osg::Matrixd &, ByInverseMatrix); I_WriteOnlyProperty(const osg::Matrixd &, ByMatrix); diff --git a/src/osgWrappers/osgGA/SetSceneViewVisitor.cpp b/src/osgWrappers/osgGA/SetSceneViewVisitor.cpp deleted file mode 100644 index ff07a3de7..000000000 --- a/src/osgWrappers/osgGA/SetSceneViewVisitor.cpp +++ /dev/null @@ -1,34 +0,0 @@ -// *************************************************************************** -// -// Generated automatically by genwrapper. -// Please DO NOT EDIT this file! -// -// *************************************************************************** - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -// Must undefine IN and OUT macros defined in Windows headers -#ifdef IN -#undef IN -#endif -#ifdef OUT -#undef OUT -#endif - -BEGIN_OBJECT_REFLECTOR(osgGA::SetSceneViewVisitor) - I_BaseType(osgGA::GUIEventHandlerVisitor); - I_Constructor3(IN, osgGA::GUIEventAdapter *, in, IN, osgGA::GUIActionAdapter *, out, IN, osgUtil::SceneView *, sv); - I_Method1(void, visit, IN, osgGA::MatrixManipulator &, cm); - I_Method1(void, visit, IN, osgGA::StateSetManipulator &, cm); -END_REFLECTOR - diff --git a/src/osgWrappers/osgGA/SimpleViewer.cpp b/src/osgWrappers/osgGA/SimpleViewer.cpp index 85fe853e6..52ec33051 100644 --- a/src/osgWrappers/osgGA/SimpleViewer.cpp +++ b/src/osgWrappers/osgGA/SimpleViewer.cpp @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include @@ -30,8 +29,7 @@ TYPE_NAME_ALIAS(std::list< osg::ref_ptr< osgGA::GUIEventHandler > >, osgGA::SimpleViewer::EventHandlers); BEGIN_OBJECT_REFLECTOR(osgGA::SimpleViewer) - I_BaseType(osgGA::GUIActionAdapter); - I_BaseType(osg::Referenced); + I_VirtualBaseType(osgGA::GraphicsWindow); I_Constructor0(); I_Method1(void, setSceneData, IN, osg::Node *, node); I_Method0(osg::Node *, getSceneData); @@ -44,8 +42,6 @@ BEGIN_OBJECT_REFLECTOR(osgGA::SimpleViewer) I_Method1(void, addEventHandler, IN, osgGA::GUIEventHandler *, eventHandler); I_Method0(osgGA::SimpleViewer::EventHandlers &, getEventHandlers); I_Method0(const osgGA::SimpleViewer::EventHandlers &, getEventHandlers); - I_Method0(osgGA::EventQueue *, getEventQueue); - I_Method0(const osgGA::EventQueue *, getEventQueue); I_Method1(void, setDatabasePager, IN, osgDB::DatabasePager *, dp); I_Method0(osgDB::DatabasePager *, getDatabasePager); I_Method0(const osgDB::DatabasePager *, getDatabasePager); @@ -57,9 +53,6 @@ BEGIN_OBJECT_REFLECTOR(osgGA::SimpleViewer) I_Method0(void, frameDrawTraversal); I_Method0(void, releaseAllGLObjects); I_Method0(void, cleanup); - I_Method0(void, requestRedraw); - I_MethodWithDefaults1(void, requestContinuousUpdate, IN, bool, x, true); - I_Method2(void, requestWarpPointer, IN, float, x, IN, float, x); I_Method0(osgUtil::SceneView *, getSceneView); I_Method0(const osgUtil::SceneView *, getSceneView); I_Method0(void, init); @@ -67,10 +60,20 @@ BEGIN_OBJECT_REFLECTOR(osgGA::SimpleViewer) I_Property(osgGA::MatrixManipulator *, CameraManipulator); I_Property(osgDB::DatabasePager *, DatabasePager); I_ReadOnlyProperty(osgGA::SimpleViewer::EventHandlers &, EventHandlers); - I_ReadOnlyProperty(osgGA::EventQueue *, EventQueue); I_Property(osg::Node *, SceneData); I_ReadOnlyProperty(osgUtil::SceneView *, SceneView); END_REFLECTOR +BEGIN_VALUE_REFLECTOR(osg::ref_ptr< osgGA::GUIEventHandler >) + I_Constructor0(); + I_Constructor1(IN, osgGA::GUIEventHandler *, ptr); + I_Constructor1(IN, const osg::ref_ptr< osgGA::GUIEventHandler > &, rp); + I_Method0(osgGA::GUIEventHandler *, get); + I_Method0(bool, valid); + I_Method0(osgGA::GUIEventHandler *, release); + I_Method1(void, swap, IN, osg::ref_ptr< osgGA::GUIEventHandler > &, rp); + I_ReadOnlyProperty(osgGA::GUIEventHandler *, ); +END_REFLECTOR + STD_LIST_REFLECTOR(std::list< osg::ref_ptr< osgGA::GUIEventHandler > >); diff --git a/src/osgWrappers/osgGA/StateSetManipulator.cpp b/src/osgWrappers/osgGA/StateSetManipulator.cpp index bdfc0f991..3daca7468 100644 --- a/src/osgWrappers/osgGA/StateSetManipulator.cpp +++ b/src/osgWrappers/osgGA/StateSetManipulator.cpp @@ -15,7 +15,6 @@ #include #include #include -#include #include // Must undefine IN and OUT macros defined in Windows headers @@ -34,7 +33,6 @@ BEGIN_OBJECT_REFLECTOR(osgGA::StateSetManipulator) I_Method0(osg::StateSet *, getStateSet); I_Method0(const osg::StateSet *, getStateSet); I_Method2(bool, handle, IN, const osgGA::GUIEventAdapter &, ea, IN, osgGA::GUIActionAdapter &, us); - I_Method1(void, accept, IN, osgGA::GUIEventHandlerVisitor &, x); I_Method1(void, getUsage, IN, osg::ApplicationUsage &, usage); I_Method1(void, setMaximumNumOfTextureUnits, IN, unsigned int, i); I_Method0(unsigned int, getMaximumNumOfTextureUnits); diff --git a/src/osgWrappers/osgProducer/ViewerEventHandler.cpp b/src/osgWrappers/osgProducer/ViewerEventHandler.cpp index 3334d364b..daa3d185c 100644 --- a/src/osgWrappers/osgProducer/ViewerEventHandler.cpp +++ b/src/osgWrappers/osgProducer/ViewerEventHandler.cpp @@ -14,7 +14,6 @@ #include #include #include -#include #include #include @@ -37,7 +36,6 @@ BEGIN_OBJECT_REFLECTOR(osgProducer::ViewerEventHandler) I_BaseType(osgGA::GUIEventHandler); I_Constructor1(IN, osgProducer::OsgCameraGroup *, cg); I_Method2(bool, handle, IN, const osgGA::GUIEventAdapter &, ea, IN, osgGA::GUIActionAdapter &, aa); - I_Method1(void, accept, IN, osgGA::GUIEventHandlerVisitor &, gehv); I_Method1(void, getUsage, IN, osg::ApplicationUsage &, usage); I_Method0(osgProducer::OsgCameraGroup *, getOsgCameraGroup); I_Method0(const osgProducer::OsgCameraGroup *, getOsgCameraGroup);