diff --git a/include/osgViewer/Viewer b/include/osgViewer/Viewer index 0a1b9a054..7d2703185 100644 --- a/include/osgViewer/Viewer +++ b/include/osgViewer/Viewer @@ -51,7 +51,7 @@ class OSGVIEWER_EXPORT Viewer : public osgViewer::View virtual void setSceneData(osg::Node* node); - /** Convinience method for setting up the viewer so it can be used embedded in an external managed window. + /** Convenience method for setting up the viewer so it can be used embedded in an external managed window. * Returns the GraphicsWindowEmbedded that can be used by applications to pass in events to the viewer. */ virtual GraphicsWindowEmbedded* setUpViewerAsEmbeddedInWindow(int x, int y, int width, int height); diff --git a/src/osgWrappers/osgViewer/GraphicsWindow.cpp b/src/osgWrappers/osgViewer/GraphicsWindow.cpp index f89ad88ee..6eb7140a3 100644 --- a/src/osgWrappers/osgViewer/GraphicsWindow.cpp +++ b/src/osgWrappers/osgViewer/GraphicsWindow.cpp @@ -184,3 +184,66 @@ BEGIN_OBJECT_REFLECTOR(osgViewer::GraphicsWindow) __void__setWindowDecoration__bool); END_REFLECTOR +BEGIN_OBJECT_REFLECTOR(osgViewer::GraphicsWindowEmbedded) + I_BaseType(osgViewer::GraphicsWindow); + I_ConstructorWithDefaults1(IN, osg::GraphicsContext::Traits *, traits, 0, + Properties::NON_EXPLICIT, + ____GraphicsWindowEmbedded__osg_GraphicsContext_Traits_P1, + "", + ""); + I_Constructor4(IN, int, x, IN, int, y, IN, int, width, IN, int, height, + ____GraphicsWindowEmbedded__int__int__int__int, + "", + ""); + I_Method0(void, init, + Properties::NON_VIRTUAL, + __void__init, + "", + ""); + I_Method0(bool, valid, + Properties::VIRTUAL, + __bool__valid, + "Return whether a valid and usable GraphicsContext has been created. ", + ""); + I_Method0(bool, realizeImplementation, + Properties::VIRTUAL, + __bool__realizeImplementation, + "Realise the GraphicsContext implementation, Pure virtual - must be implemented by concrate implementations of GraphicsContext. ", + ""); + I_Method0(bool, isRealizedImplementation, + Properties::VIRTUAL, + __bool__isRealizedImplementation, + "Return true if the graphics context has been realised, and is ready to use, implementation. ", + "Pure virtual - must be implemented by concrate implementations of GraphicsContext. "); + I_Method0(void, closeImplementation, + Properties::VIRTUAL, + __void__closeImplementation, + "Close the graphics context implementation. ", + "Pure virtual - must be implemented by concrate implementations of GraphicsContext. "); + I_Method0(bool, makeCurrentImplementation, + Properties::VIRTUAL, + __bool__makeCurrentImplementation, + "Make this graphics context current implementation. ", + "Pure virtual - must be implemented by concrate implementations of GraphicsContext. "); + I_Method0(bool, releaseContextImplementation, + Properties::VIRTUAL, + __bool__releaseContextImplementation, + "Release the graphics context. ", + ""); + I_Method0(void, swapBuffersImplementation, + Properties::VIRTUAL, + __void__swapBuffersImplementation, + "Swap the front and back buffers implementation. ", + "Pure virtual - must be implemented by Concrate implementations of GraphicsContext. "); + I_Method0(void, grabFocus, + Properties::VIRTUAL, + __void__grabFocus, + "Get focus. ", + ""); + I_Method0(void, grabFocusIfPointerInWindow, + Properties::VIRTUAL, + __void__grabFocusIfPointerInWindow, + "Get focus on if the pointer is in this window. ", + ""); +END_REFLECTOR + diff --git a/src/osgWrappers/osgViewer/Viewer.cpp b/src/osgWrappers/osgViewer/Viewer.cpp index 0889bff68..2ffc065ea 100644 --- a/src/osgWrappers/osgViewer/Viewer.cpp +++ b/src/osgWrappers/osgViewer/Viewer.cpp @@ -16,6 +16,7 @@ #include #include #include +#include #include // Must undefine IN and OUT macros defined in Windows headers @@ -102,8 +103,13 @@ BEGIN_OBJECT_REFLECTOR(osgViewer::Viewer) I_Method1(void, setSceneData, IN, osg::Node *, node, Properties::VIRTUAL, __void__setSceneData__osg_Node_P1, - "", + "Set the sene graph data that viewer with view. ", ""); + I_Method4(osgViewer::GraphicsWindowEmbedded *, setUpViewerAsEmbeddedInWindow, IN, int, x, IN, int, y, IN, int, width, IN, int, height, + Properties::VIRTUAL, + __GraphicsWindowEmbedded_P1__setUpViewerAsEmbeddedInWindow__int__int__int__int, + "Convinience method for setting up the viewer so it can be used embedded in an external managed window. ", + "Returns the GraphicsWindowEmbedded that can be used by applications to pass in events to the viewer. "); I_Method1(void, setThreadingModel, IN, osgViewer::Viewer::ThreadingModel, threadingModel, Properties::NON_VIRTUAL, __void__setThreadingModel__ThreadingModel,