From 16bae8830ecf19cd90d2e5083b95443e41e42a9f Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 28 Nov 2008 14:35:47 +0000 Subject: [PATCH] Updated wrappers --- src/osgWrappers/osgWidget/Box.cpp | 8 +- src/osgWrappers/osgWidget/Canvas.cpp | 2 +- src/osgWrappers/osgWidget/EventInterface.cpp | 11 +- src/osgWrappers/osgWidget/Frame.cpp | 171 ++++++++++++------ src/osgWrappers/osgWidget/Input.cpp | 5 + src/osgWrappers/osgWidget/Label.cpp | 11 -- .../osgWidget/ViewerEventHandlers.cpp | 22 ++- src/osgWrappers/osgWidget/Widget.cpp | 47 +++-- src/osgWrappers/osgWidget/Window.cpp | 47 ++++- src/osgWrappers/osgWidget/WindowManager.cpp | 22 ++- 10 files changed, 235 insertions(+), 111 deletions(-) diff --git a/src/osgWrappers/osgWidget/Box.cpp b/src/osgWrappers/osgWidget/Box.cpp index 366d706a0..d98925467 100644 --- a/src/osgWrappers/osgWidget/Box.cpp +++ b/src/osgWrappers/osgWidget/Box.cpp @@ -22,7 +22,7 @@ #undef OUT #endif -BEGIN_ENUM_REFLECTOR(osgWidget::Box::BOX_TYPE) +BEGIN_ENUM_REFLECTOR(osgWidget::Box::BoxType) I_DeclaringFile("osgWidget/Box"); I_EnumLabel(osgWidget::Box::VERTICAL); I_EnumLabel(osgWidget::Box::HORIZONTAL); @@ -56,9 +56,9 @@ BEGIN_OBJECT_REFLECTOR(osgWidget::Box) __C5_char_P1__className, "return the name of the node's class type. ", ""); - I_ConstructorWithDefaults3(IN, const std::string &, x, "", IN, osgWidget::Box::BOX_TYPE, x, osgWidget::Box::HORIZONTAL, IN, bool, x, false, - ____Box__C5_std_string_R1__BOX_TYPE__bool, - "", + I_ConstructorWithDefaults3(IN, const std::string &, x, "", IN, osgWidget::Box::BoxType, x, osgWidget::Box::HORIZONTAL, IN, bool, x, false, + ____Box__C5_std_string_R1__BoxType__bool, + "The main constructor; takes the string name, the BoxType orientation, and a boolean indicating whether or not all of the Box regions should be uniformly sized. ", ""); I_Constructor2(IN, const osgWidget::Box &, x, IN, const osg::CopyOp &, x, ____Box__C5_Box_R1__C5_osg_CopyOp_R1, diff --git a/src/osgWrappers/osgWidget/Canvas.cpp b/src/osgWrappers/osgWidget/Canvas.cpp index 9ceb01375..027bc17db 100644 --- a/src/osgWrappers/osgWidget/Canvas.cpp +++ b/src/osgWrappers/osgWidget/Canvas.cpp @@ -64,7 +64,7 @@ BEGIN_OBJECT_REFLECTOR(osgWidget::Canvas) I_Method3(bool, addWidget, IN, osgWidget::Widget *, x, IN, osgWidget::point_type, x, IN, osgWidget::point_type, x, Properties::VIRTUAL, __bool__addWidget__Widget_P1__point_type__point_type, - "", + "Adds a Widget at the given XY coordinate. ", ""); I_ProtectedMethod2(void, _resizeImplementation, IN, osgWidget::point_type, x, IN, osgWidget::point_type, x, Properties::VIRTUAL, diff --git a/src/osgWrappers/osgWidget/EventInterface.cpp b/src/osgWrappers/osgWidget/EventInterface.cpp index 4c87e2e9c..bbc488099 100644 --- a/src/osgWrappers/osgWidget/EventInterface.cpp +++ b/src/osgWrappers/osgWidget/EventInterface.cpp @@ -23,8 +23,9 @@ #undef OUT #endif -BEGIN_VALUE_REFLECTOR(osgWidget::Callback) +BEGIN_OBJECT_REFLECTOR(osgWidget::Callback) I_DeclaringFile("osgWidget/EventInterface"); + I_BaseType(osg::Referenced); I_Constructor0(____Callback, "", ""); @@ -33,6 +34,10 @@ BEGIN_VALUE_REFLECTOR(osgWidget::Callback) ____Callback__C5_Callback_R1, "", ""); + I_ConstructorWithDefaults2(IN, osgWidget::EventType, type, , IN, void *, data, 0, + ____Callback__EventType__void_P1, + "", + ""); I_Method0(osgWidget::EventType, getType, Properties::NON_VIRTUAL, __EventType__getType, @@ -234,9 +239,9 @@ BEGIN_VALUE_REFLECTOR(osgWidget::EventInterface) __unsigned_int__getEventMask, "", ""); - I_Method1(void, addCallback, IN, const osgWidget::Callback &, cb, + I_Method1(void, addCallback, IN, osgWidget::Callback *, cb, Properties::NON_VIRTUAL, - __void__addCallback__C5_Callback_R1, + __void__addCallback__Callback_P1, "", ""); I_Method1(bool, callCallbacks, IN, osgWidget::Event &, ev, diff --git a/src/osgWrappers/osgWidget/Frame.cpp b/src/osgWrappers/osgWidget/Frame.cpp index dbccf97c3..988e0bb39 100644 --- a/src/osgWrappers/osgWidget/Frame.cpp +++ b/src/osgWrappers/osgWidget/Frame.cpp @@ -11,6 +11,7 @@ #include #include +#include #include #include #include @@ -25,7 +26,7 @@ #undef OUT #endif -BEGIN_ENUM_REFLECTOR(osgWidget::Frame::CORNER) +BEGIN_ENUM_REFLECTOR(osgWidget::Frame::CornerType) I_DeclaringFile("osgWidget/Frame"); I_EnumLabel(osgWidget::Frame::CORNER_LOWER_LEFT); I_EnumLabel(osgWidget::Frame::CORNER_LOWER_RIGHT); @@ -33,7 +34,7 @@ BEGIN_ENUM_REFLECTOR(osgWidget::Frame::CORNER) I_EnumLabel(osgWidget::Frame::CORNER_UPPER_RIGHT); END_REFLECTOR -BEGIN_ENUM_REFLECTOR(osgWidget::Frame::BORDER) +BEGIN_ENUM_REFLECTOR(osgWidget::Frame::BorderType) I_DeclaringFile("osgWidget/Frame"); I_EnumLabel(osgWidget::Frame::BORDER_LEFT); I_EnumLabel(osgWidget::Frame::BORDER_RIGHT); @@ -41,6 +42,14 @@ BEGIN_ENUM_REFLECTOR(osgWidget::Frame::BORDER) I_EnumLabel(osgWidget::Frame::BORDER_BOTTOM); END_REFLECTOR +BEGIN_ENUM_REFLECTOR(osgWidget::Frame::FrameOptions) + I_DeclaringFile("osgWidget/Frame"); + I_EnumLabel(osgWidget::Frame::FRAME_RESIZE); + I_EnumLabel(osgWidget::Frame::FRAME_MOVE); + I_EnumLabel(osgWidget::Frame::FRAME_TEXTURE); + I_EnumLabel(osgWidget::Frame::FRAME_ALL); +END_REFLECTOR + BEGIN_OBJECT_REFLECTOR(osgWidget::Frame) I_DeclaringFile("osgWidget/Frame"); I_BaseType(osgWidget::Table); @@ -69,28 +78,22 @@ BEGIN_OBJECT_REFLECTOR(osgWidget::Frame) __C5_char_P1__className, "return the name of the node's class type. ", ""); - I_ConstructorWithDefaults1(IN, const std::string &, x, "", - Properties::NON_EXPLICIT, - ____Frame__C5_std_string_R1, + I_ConstructorWithDefaults2(IN, const std::string &, x, "", IN, unsigned, int, 0, + ____Frame__C5_std_string_R1__unsigned, "", ""); I_Constructor2(IN, const osgWidget::Frame &, x, IN, const osg::CopyOp &, x, ____Frame__C5_Frame_R1__C5_osg_CopyOp_R1, "", ""); - I_Method1(void, managed, IN, osgWidget::WindowManager *, x, - Properties::VIRTUAL, - __void__managed__WindowManager_P1, - "", - ""); I_Method4(void, createSimpleFrame, IN, osgWidget::point_type, cw, IN, osgWidget::point_type, ch, IN, osgWidget::point_type, w, IN, osgWidget::point_type, h, Properties::NON_VIRTUAL, __void__createSimpleFrame__point_type__point_type__point_type__point_type, "", ""); - I_Method7(void, createSimpleFrameWithSingleTexture, IN, const std::string &, tex, IN, osgWidget::point_type, tw, IN, osgWidget::point_type, th, IN, osgWidget::point_type, cw, IN, osgWidget::point_type, ch, IN, osgWidget::point_type, w, IN, osgWidget::point_type, h, + I_Method3(void, createSimpleFrameWithSingleTexture, IN, osg::Image *, image, IN, osgWidget::point_type, w, IN, osgWidget::point_type, h, Properties::NON_VIRTUAL, - __void__createSimpleFrameWithSingleTexture__C5_std_string_R1__point_type__point_type__point_type__point_type__point_type__point_type, + __void__createSimpleFrameWithSingleTexture__osg_Image_P1__point_type__point_type, "", ""); I_Method1(bool, setWindow, IN, osgWidget::Window *, x, @@ -108,57 +111,94 @@ BEGIN_OBJECT_REFLECTOR(osgWidget::Frame) __C5_EmbeddedWindow_P1__getEmbeddedWindow, "", ""); - I_Method1(osgWidget::Frame::Corner *, getCorner, IN, osgWidget::Frame::CORNER, c, + I_Method1(osgWidget::Frame::Corner *, getCorner, IN, osgWidget::Frame::CornerType, c, Properties::NON_VIRTUAL, - __Corner_P1__getCorner__CORNER, + __Corner_P1__getCorner__CornerType, "", ""); - I_Method1(const osgWidget::Frame::Corner *, getCorner, IN, osgWidget::Frame::CORNER, c, + I_Method1(const osgWidget::Frame::Corner *, getCorner, IN, osgWidget::Frame::CornerType, c, Properties::NON_VIRTUAL, - __C5_Corner_P1__getCorner__CORNER, + __C5_Corner_P1__getCorner__CornerType, "", ""); - I_Method1(osgWidget::Frame::Border *, getBorder, IN, osgWidget::Frame::BORDER, b, + I_Method1(osgWidget::Frame::Border *, getBorder, IN, osgWidget::Frame::BorderType, b, Properties::NON_VIRTUAL, - __Border_P1__getBorder__BORDER, + __Border_P1__getBorder__BorderType, "", ""); - I_Method1(const osgWidget::Frame::Border *, getBorder, IN, osgWidget::Frame::BORDER, b, + I_Method1(const osgWidget::Frame::Border *, getBorder, IN, osgWidget::Frame::BorderType, b, Properties::NON_VIRTUAL, - __C5_Border_P1__getBorder__BORDER, + __C5_Border_P1__getBorder__BorderType, "", ""); - I_StaticMethod1(std::string, cornerToString, IN, osgWidget::Frame::CORNER, x, - __std_string__cornerToString__CORNER_S, + I_Method2(bool, resizeFrame, IN, osgWidget::point_type, x, IN, osgWidget::point_type, x, + Properties::NON_VIRTUAL, + __bool__resizeFrame__point_type__point_type, + "", + ""); + I_Method0(unsigned int, getFlags, + Properties::NON_VIRTUAL, + __unsigned_int__getFlags, + "", + ""); + I_Method1(void, setFlags, IN, unsigned int, flags, + Properties::NON_VIRTUAL, + __void__setFlags__unsigned_int, + "", + ""); + I_Method0(bool, canResize, + Properties::NON_VIRTUAL, + __bool__canResize, + "", + ""); + I_Method0(bool, canMove, + Properties::NON_VIRTUAL, + __bool__canMove, + "", + ""); + I_Method0(bool, canTexture, + Properties::NON_VIRTUAL, + __bool__canTexture, + "", + ""); + I_StaticMethod1(std::string, cornerTypeToString, IN, osgWidget::Frame::CornerType, x, + __std_string__cornerTypeToString__CornerType_S, "", ""); - I_StaticMethod1(std::string, borderToString, IN, osgWidget::Frame::BORDER, x, - __std_string__borderToString__BORDER_S, + I_StaticMethod1(std::string, borderTypeToString, IN, osgWidget::Frame::BorderType, x, + __std_string__borderTypeToString__BorderType_S, "", ""); - I_StaticMethodWithDefaults6(osgWidget::Frame *, createSimpleFrame, IN, const std::string &, x, , IN, osgWidget::point_type, x, , IN, osgWidget::point_type, x, , IN, osgWidget::point_type, x, , IN, osgWidget::point_type, x, , IN, osgWidget::Frame *, x, 0, - __Frame_P1__createSimpleFrame__C5_std_string_R1__point_type__point_type__point_type__point_type__Frame_P1_S, + I_StaticMethodWithDefaults7(osgWidget::Frame *, createSimpleFrame, IN, const std::string &, x, , IN, osgWidget::point_type, x, , IN, osgWidget::point_type, x, , IN, osgWidget::point_type, x, , IN, osgWidget::point_type, x, , IN, unsigned, int, 0, IN, osgWidget::Frame *, x, 0, + __Frame_P1__createSimpleFrame__C5_std_string_R1__point_type__point_type__point_type__point_type__unsigned__Frame_P1_S, "", ""); - I_StaticMethodWithDefaults9(osgWidget::Frame *, createSimpleFrameWithSingleTexture, IN, const std::string &, x, , IN, const std::string &, x, , IN, osgWidget::point_type, x, , IN, osgWidget::point_type, x, , IN, osgWidget::point_type, x, , IN, osgWidget::point_type, x, , IN, osgWidget::point_type, x, , IN, osgWidget::point_type, x, , IN, osgWidget::Frame *, x, 0, - __Frame_P1__createSimpleFrameWithSingleTexture__C5_std_string_R1__C5_std_string_R1__point_type__point_type__point_type__point_type__point_type__point_type__Frame_P1_S, + I_StaticMethodWithDefaults6(osgWidget::Frame *, createSimpleFrameWithSingleTexture, IN, const std::string &, x, , IN, osg::Image *, x, , IN, osgWidget::point_type, x, , IN, osgWidget::point_type, x, , IN, unsigned, int, 0, IN, osgWidget::Frame *, x, 0, + __Frame_P1__createSimpleFrameWithSingleTexture__C5_std_string_R1__osg_Image_P1__point_type__point_type__unsigned__Frame_P1_S, "", ""); - I_ProtectedMethod1(osgWidget::Widget *, _getCorner, IN, osgWidget::Frame::CORNER, x, + I_StaticMethodWithDefaults6(osgWidget::Frame *, createSimpleFrameFromTheme, IN, const std::string &, x, , IN, osg::Image *, x, , IN, osgWidget::point_type, x, , IN, osgWidget::point_type, x, , IN, unsigned, int, 0, IN, osgWidget::Frame *, x, 0, + __Frame_P1__createSimpleFrameFromTheme__C5_std_string_R1__osg_Image_P1__point_type__point_type__unsigned__Frame_P1_S, + "", + ""); + I_ProtectedMethod1(osgWidget::Widget *, _getCorner, IN, osgWidget::Frame::CornerType, x, Properties::NON_VIRTUAL, Properties::CONST, - __Widget_P1___getCorner__CORNER, + __Widget_P1___getCorner__CornerType, "", ""); - I_ProtectedMethod1(osgWidget::Widget *, _getBorder, IN, osgWidget::Frame::BORDER, x, + I_ProtectedMethod1(osgWidget::Widget *, _getBorder, IN, osgWidget::Frame::BorderType, x, Properties::NON_VIRTUAL, Properties::CONST, - __Widget_P1___getBorder__BORDER, + __Widget_P1___getBorder__BorderType, "", ""); I_SimpleProperty(osgWidget::Window::EmbeddedWindow *, EmbeddedWindow, __EmbeddedWindow_P1__getEmbeddedWindow, 0); + I_SimpleProperty(unsigned int, Flags, + __unsigned_int__getFlags, + __void__setFlags__unsigned_int); I_SimpleProperty(osgWidget::Window *, Window, 0, __bool__setWindow__Window_P1); @@ -192,40 +232,50 @@ BEGIN_OBJECT_REFLECTOR(osgWidget::Frame::Border) __C5_char_P1__className, "return the name of the object's class type. ", "Must be defined by derived classes. "); - I_ConstructorWithDefaults3(IN, osgWidget::Frame::BORDER, x, osgWidget::Frame::BORDER_LEFT, IN, osgWidget::point_type, x, 0.0f, IN, osgWidget::point_type, x, 0.0f, - ____Border__BORDER__point_type__point_type, + I_ConstructorWithDefaults3(IN, osgWidget::Frame::BorderType, x, osgWidget::Frame::BORDER_LEFT, IN, osgWidget::point_type, x, 0.0f, IN, osgWidget::point_type, x, 0.0f, + ____Border__BorderType__point_type__point_type, "", ""); I_Constructor2(IN, const osgWidget::Frame::Border &, x, IN, const osg::CopyOp &, x, ____Border__C5_Border_R1__C5_osg_CopyOp_R1, "", ""); + I_Method1(void, parented, IN, osgWidget::Window *, x, + Properties::VIRTUAL, + __void__parented__Window_P1, + "", + ""); + I_Method0(void, positioned, + Properties::VIRTUAL, + __void__positioned, + "", + ""); I_Method3(bool, mouseDrag, IN, double, x, IN, double, x, IN, osgWidget::WindowManager *, x, Properties::VIRTUAL, __bool__mouseDrag__double__double__WindowManager_P1, "", ""); - I_Method0(osgWidget::Frame::BORDER, getBorder, + I_Method0(osgWidget::Frame::BorderType, getBorderType, Properties::NON_VIRTUAL, - __BORDER__getBorder, + __BorderType__getBorderType, "", ""); - I_Method1(void, setBorder, IN, osgWidget::Frame::BORDER, border, + I_Method1(void, setBorderType, IN, osgWidget::Frame::BorderType, border, Properties::NON_VIRTUAL, - __void__setBorder__BORDER, + __void__setBorderType__BorderType, "", ""); - I_Method1(void, setBorderAndName, IN, osgWidget::Frame::BORDER, border, + I_Method1(void, setBorderTypeAndName, IN, osgWidget::Frame::BorderType, border, Properties::NON_VIRTUAL, - __void__setBorderAndName__BORDER, + __void__setBorderTypeAndName__BorderType, "", ""); - I_SimpleProperty(osgWidget::Frame::BORDER, Border, - __BORDER__getBorder, - __void__setBorder__BORDER); - I_SimpleProperty(osgWidget::Frame::BORDER, BorderAndName, + I_SimpleProperty(osgWidget::Frame::BorderType, BorderType, + __BorderType__getBorderType, + __void__setBorderType__BorderType); + I_SimpleProperty(osgWidget::Frame::BorderType, BorderTypeAndName, 0, - __void__setBorderAndName__BORDER); + __void__setBorderTypeAndName__BorderType); END_REFLECTOR BEGIN_OBJECT_REFLECTOR(osgWidget::Frame::Corner) @@ -256,39 +306,44 @@ BEGIN_OBJECT_REFLECTOR(osgWidget::Frame::Corner) __C5_char_P1__className, "return the name of the object's class type. ", "Must be defined by derived classes. "); - I_ConstructorWithDefaults3(IN, osgWidget::Frame::CORNER, x, osgWidget::Frame::CORNER_LOWER_LEFT, IN, osgWidget::point_type, x, 0.0f, IN, osgWidget::point_type, x, 0.0f, - ____Corner__CORNER__point_type__point_type, + I_ConstructorWithDefaults3(IN, osgWidget::Frame::CornerType, x, osgWidget::Frame::CORNER_LOWER_LEFT, IN, osgWidget::point_type, x, 0.0f, IN, osgWidget::point_type, x, 0.0f, + ____Corner__CornerType__point_type__point_type, "", ""); I_Constructor2(IN, const osgWidget::Frame::Corner &, x, IN, const osg::CopyOp &, x, ____Corner__C5_Corner_R1__C5_osg_CopyOp_R1, "", ""); + I_Method1(void, parented, IN, osgWidget::Window *, x, + Properties::VIRTUAL, + __void__parented__Window_P1, + "", + ""); I_Method3(bool, mouseDrag, IN, double, x, IN, double, x, IN, osgWidget::WindowManager *, x, Properties::VIRTUAL, __bool__mouseDrag__double__double__WindowManager_P1, "", ""); - I_Method0(osgWidget::Frame::CORNER, getCorner, + I_Method0(osgWidget::Frame::CornerType, getCornerType, Properties::NON_VIRTUAL, - __CORNER__getCorner, + __CornerType__getCornerType, "", ""); - I_Method1(void, setCorner, IN, osgWidget::Frame::CORNER, corner, + I_Method1(void, setCornerType, IN, osgWidget::Frame::CornerType, corner, Properties::NON_VIRTUAL, - __void__setCorner__CORNER, + __void__setCornerType__CornerType, "", ""); - I_Method1(void, setCornerAndName, IN, osgWidget::Frame::CORNER, corner, + I_Method1(void, setCornerTypeAndName, IN, osgWidget::Frame::CornerType, corner, Properties::NON_VIRTUAL, - __void__setCornerAndName__CORNER, + __void__setCornerTypeAndName__CornerType, "", ""); - I_SimpleProperty(osgWidget::Frame::CORNER, Corner, - __CORNER__getCorner, - __void__setCorner__CORNER); - I_SimpleProperty(osgWidget::Frame::CORNER, CornerAndName, + I_SimpleProperty(osgWidget::Frame::CornerType, CornerType, + __CornerType__getCornerType, + __void__setCornerType__CornerType); + I_SimpleProperty(osgWidget::Frame::CornerType, CornerTypeAndName, 0, - __void__setCornerAndName__CORNER); + __void__setCornerTypeAndName__CornerType); END_REFLECTOR diff --git a/src/osgWrappers/osgWidget/Input.cpp b/src/osgWrappers/osgWidget/Input.cpp index f99feb80a..c384b7bd3 100644 --- a/src/osgWrappers/osgWidget/Input.cpp +++ b/src/osgWrappers/osgWidget/Input.cpp @@ -67,6 +67,11 @@ BEGIN_OBJECT_REFLECTOR(osgWidget::Input) __void__setCursor__Widget_P1, "", ""); + I_MethodWithDefaults1(unsigned int, calculateBestYOffset, IN, const std::string &, x, "qgl", + Properties::NON_VIRTUAL, + __unsigned_int__calculateBestYOffset__C5_std_string_R1, + "", + ""); I_Method1(void, setXOffset, IN, osgWidget::point_type, xo, Properties::NON_VIRTUAL, __void__setXOffset__point_type, diff --git a/src/osgWrappers/osgWidget/Label.cpp b/src/osgWrappers/osgWidget/Label.cpp index 171a04b1f..9c84364bd 100644 --- a/src/osgWrappers/osgWidget/Label.cpp +++ b/src/osgWrappers/osgWidget/Label.cpp @@ -16,7 +16,6 @@ #include #include #include -#include // Must undefine IN and OUT macros defined in Windows headers #ifdef IN @@ -72,21 +71,11 @@ BEGIN_OBJECT_REFLECTOR(osgWidget::Label) __void__unparented__Window_P1, "", ""); - I_Method1(void, managed, IN, osgWidget::WindowManager *, x, - Properties::VIRTUAL, - __void__managed__WindowManager_P1, - "", - ""); I_Method0(void, positioned, Properties::VIRTUAL, __void__positioned, "", ""); - I_Method0(void, update, - Properties::NON_VIRTUAL, - __void__update, - "", - ""); I_Method1(void, setLabel, IN, const std::string &, x, Properties::NON_VIRTUAL, __void__setLabel__C5_std_string_R1, diff --git a/src/osgWrappers/osgWidget/ViewerEventHandlers.cpp b/src/osgWrappers/osgWidget/ViewerEventHandlers.cpp index c1be780ed..2f2b5dc05 100644 --- a/src/osgWrappers/osgWidget/ViewerEventHandlers.cpp +++ b/src/osgWrappers/osgWidget/ViewerEventHandlers.cpp @@ -26,6 +26,20 @@ #undef OUT #endif +BEGIN_OBJECT_REFLECTOR(osgWidget::CameraSwitchHandler) + I_DeclaringFile("osgWidget/ViewerEventHandlers"); + I_BaseType(osgGA::GUIEventHandler); + I_Constructor2(IN, osgWidget::WindowManager *, x, IN, osg::Camera *, x, + ____CameraSwitchHandler__WindowManager_P1__osg_Camera_P1, + "", + ""); + I_Method4(bool, handle, IN, const osgGA::GUIEventAdapter &, x, IN, osgGA::GUIActionAdapter &, x, IN, osg::Object *, x, IN, osg::NodeVisitor *, x, + Properties::VIRTUAL, + __bool__handle__C5_osgGA_GUIEventAdapter_R1__osgGA_GUIActionAdapter_R1__osg_Object_P1__osg_NodeVisitor_P1, + "Handle events, return true if handled, false otherwise. ", + ""); +END_REFLECTOR + BEGIN_OBJECT_REFLECTOR(osgWidget::KeyboardHandler) I_DeclaringFile("osgWidget/ViewerEventHandlers"); I_BaseType(osgGA::GUIEventHandler); @@ -111,10 +125,10 @@ END_REFLECTOR BEGIN_OBJECT_REFLECTOR(osgWidget::ResizeHandler) I_DeclaringFile("osgWidget/ViewerEventHandlers"); I_BaseType(osgGA::GUIEventHandler); - I_Constructor2(IN, osgWidget::WindowManager *, x, IN, osg::Camera *, x, - ____ResizeHandler__WindowManager_P1__osg_Camera_P1, - "", - ""); + I_ConstructorWithDefaults2(IN, osgWidget::WindowManager *, x, , IN, osg::Camera *, x, 0, + ____ResizeHandler__WindowManager_P1__osg_Camera_P1, + "", + ""); I_Method4(bool, handle, IN, const osgGA::GUIEventAdapter &, x, IN, osgGA::GUIActionAdapter &, x, IN, osg::Object *, x, IN, osg::NodeVisitor *, x, Properties::VIRTUAL, __bool__handle__C5_osgGA_GUIEventAdapter_R1__osgGA_GUIActionAdapter_R1__osg_Object_P1__osg_NodeVisitor_P1, diff --git a/src/osgWrappers/osgWidget/Widget.cpp b/src/osgWrappers/osgWidget/Widget.cpp index b270f16ff..1fa84b2d8 100644 --- a/src/osgWrappers/osgWidget/Widget.cpp +++ b/src/osgWrappers/osgWidget/Widget.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -342,6 +343,11 @@ BEGIN_OBJECT_REFLECTOR(osgWidget::Widget) __void__setTexCoord__texcoord_type__texcoord_type__Corner, "", ""); + I_MethodWithDefaults2(void, setLayer, IN, osgWidget::Widget::Layer, l, , IN, unsigned int, offset, 0, + Properties::NON_VIRTUAL, + __void__setLayer__Layer__unsigned_int, + "", + ""); I_Method4(void, setTexCoordRegion, IN, osgWidget::point_type, x, IN, osgWidget::point_type, x, IN, osgWidget::point_type, x, IN, osgWidget::point_type, x, Properties::NON_VIRTUAL, __void__setTexCoordRegion__point_type__point_type__point_type__point_type, @@ -357,14 +363,19 @@ BEGIN_OBJECT_REFLECTOR(osgWidget::Widget) __void__setTexCoordWrapVertical, "", ""); - I_MethodWithDefaults2(bool, setImage, IN, osg::Image *, x, , IN, bool, x, false, + I_MethodWithDefaults3(bool, setImage, IN, osg::Image *, x, , IN, bool, x, false, IN, bool, x, false, Properties::NON_VIRTUAL, - __bool__setImage__osg_Image_P1__bool, + __bool__setImage__osg_Image_P1__bool__bool, "", ""); - I_MethodWithDefaults2(bool, setImage, IN, const std::string &, x, , IN, bool, x, false, + I_MethodWithDefaults3(bool, setImage, IN, const std::string &, x, , IN, bool, x, false, IN, bool, x, false, Properties::NON_VIRTUAL, - __bool__setImage__C5_std_string_R1__bool, + __bool__setImage__C5_std_string_R1__bool__bool, + "", + ""); + I_MethodWithDefaults3(bool, setTexture, IN, osg::Texture *, x, , IN, bool, x, false, IN, bool, x, false, + Properties::NON_VIRTUAL, + __bool__setTexture__osg_Texture_P1__bool__bool, "", ""); I_Method1(void, addX, IN, osgWidget::point_type, x, @@ -447,11 +458,6 @@ BEGIN_OBJECT_REFLECTOR(osgWidget::Widget) __C5_TexCoord_R1__getTexCoord__Corner, "", ""); - I_Method1(osgWidget::Widget::Corner, convertCorner, IN, osgWidget::Widget::Corner, x, - Properties::NON_VIRTUAL, - __Corner__convertCorner__Corner, - "", - ""); I_Method2(osgWidget::Color, getImageColorAtXY, IN, osgWidget::point_type, x, IN, osgWidget::point_type, y, Properties::NON_VIRTUAL, __Color__getImageColorAtXY__point_type__point_type, @@ -542,6 +548,16 @@ BEGIN_OBJECT_REFLECTOR(osgWidget::Widget) __void__setTexCoordRegion__C5_XYCoord_R1__point_type__point_type, "", ""); + I_Method3(void, setTexCoordRegion, IN, osgWidget::point_type, x, IN, osgWidget::point_type, y, IN, const osgWidget::XYCoord &, wh, + Properties::NON_VIRTUAL, + __void__setTexCoordRegion__point_type__point_type__C5_XYCoord_R1, + "", + ""); + I_Method2(void, setTexCoordRegion, IN, const osgWidget::XYCoord &, xy, IN, const osgWidget::XYCoord &, wh, + Properties::NON_VIRTUAL, + __void__setTexCoordRegion__C5_XYCoord_R1__C5_XYCoord_R1, + "", + ""); I_MethodWithDefaults2(void, addColor, IN, const osgWidget::Color &, col, , IN, osgWidget::Widget::Corner, p, osgWidget::Widget::ALL_CORNERS, Properties::NON_VIRTUAL, __void__addColor__C5_Color_R1__Corner, @@ -567,11 +583,6 @@ BEGIN_OBJECT_REFLECTOR(osgWidget::Widget) __void__setMinimumSize__C5_XYCoord_R1, "", ""); - I_MethodWithDefaults2(void, setLayer, IN, osgWidget::Widget::Layer, l, , IN, unsigned int, offset, 0, - Properties::NON_VIRTUAL, - __void__setLayer__Layer__unsigned_int, - "", - ""); I_Method1(void, setPadLeft, IN, osgWidget::point_type, p, Properties::NON_VIRTUAL, __void__setPadLeft__point_type, @@ -799,16 +810,16 @@ BEGIN_OBJECT_REFLECTOR(osgWidget::Widget) __C5_TexCoordArray_P1___texs, "", ""); - I_ProtectedMethod0(osg::Texture2D *, _texture, + I_ProtectedMethod0(osg::Texture *, _texture, Properties::NON_VIRTUAL, Properties::NON_CONST, - __osg_Texture2D_P1___texture, + __osg_Texture_P1___texture, "", ""); - I_ProtectedMethod0(const osg::Texture2D *, _texture, + I_ProtectedMethod0(const osg::Texture *, _texture, Properties::NON_VIRTUAL, Properties::CONST, - __C5_osg_Texture2D_P1___texture, + __C5_osg_Texture_P1___texture, "", ""); I_ProtectedMethod0(osg::Image *, _image, diff --git a/src/osgWrappers/osgWidget/Window.cpp b/src/osgWrappers/osgWidget/Window.cpp index 3a347af1b..9d555ef50 100644 --- a/src/osgWrappers/osgWidget/Window.cpp +++ b/src/osgWrappers/osgWidget/Window.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -130,6 +131,11 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osgWidget::Window) __unsigned_int__addDrawableAndGetIndex__osg_Drawable_P1, "", ""); + I_Method1(unsigned int, addChildAndGetIndex, IN, osg::Node *, x, + Properties::NON_VIRTUAL, + __unsigned_int__addChildAndGetIndex__osg_Node_P1, + "", + ""); I_Method0(bool, isVisible, Properties::NON_VIRTUAL, __bool__isVisible, @@ -160,6 +166,11 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osgWidget::Window) __bool__setFocused__C5_std_string_R1, "", ""); + I_Method0(bool, grabFocus, + Properties::NON_VIRTUAL, + __bool__grabFocus, + "", + ""); I_Method0(bool, setFirstFocusable, Properties::NON_VIRTUAL, __bool__setFirstFocusable, @@ -195,11 +206,11 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osgWidget::Window) __XYCoord__getAbsoluteOrigin, "", ""); - I_Method0(osgWidget::Window::EmbeddedWindow *, embed, - Properties::NON_VIRTUAL, - __EmbeddedWindow_P1__embed, - "", - ""); + I_MethodWithDefaults3(osgWidget::Window::EmbeddedWindow *, embed, IN, const std::string &, x, "", IN, osgWidget::Widget::Layer, x, osgWidget::Widget::LAYER_MIDDLE, IN, unsigned, int, 0, + Properties::NON_VIRTUAL, + __EmbeddedWindow_P1__embed__C5_std_string_R1__Widget_Layer__unsigned, + "", + ""); I_Method0(osgWidget::Widget *, getFocused, Properties::NON_VIRTUAL, __Widget_P1__getFocused, @@ -390,6 +401,16 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osgWidget::Window) __void__setY__matrix_type, "", ""); + I_Method1(void, setZ, IN, osgWidget::matrix_type, z, + Properties::NON_VIRTUAL, + __void__setZ__matrix_type, + "", + ""); + I_Method1(void, setZRange, IN, osgWidget::matrix_type, zRange, + Properties::NON_VIRTUAL, + __void__setZRange__matrix_type, + "", + ""); I_Method3(void, setPosition, IN, osgWidget::matrix_type, x, IN, osgWidget::matrix_type, y, IN, osgWidget::matrix_type, z, Properties::NON_VIRTUAL, __void__setPosition__matrix_type__matrix_type__matrix_type, @@ -405,6 +426,11 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osgWidget::Window) __void__setOrigin__matrix_type__matrix_type, "", ""); + I_Method1(void, setOrigin, IN, const osgWidget::XYCoord &, xy, + Properties::NON_VIRTUAL, + __void__setOrigin__C5_XYCoord_R1, + "", + ""); I_Method1(void, setRotate, IN, osgWidget::matrix_type, r, Properties::NON_VIRTUAL, __void__setRotate__matrix_type, @@ -777,7 +803,7 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osgWidget::Window) 0); I_SimpleProperty(osgWidget::XYCoord, Origin, __XYCoord__getOrigin, - 0); + __void__setOrigin__C5_XYCoord_R1); I_SimpleProperty(osgWidget::Window *, Parent, __Window_P1__getParent, 0); @@ -822,10 +848,10 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osgWidget::Window) __void__setY__matrix_type); I_SimpleProperty(osgWidget::matrix_type, Z, __matrix_type__getZ, - 0); + __void__setZ__matrix_type); I_SimpleProperty(osgWidget::matrix_type, ZRange, __matrix_type__getZRange, - 0); + __void__setZRange__matrix_type); END_REFLECTOR BEGIN_OBJECT_REFLECTOR(osgWidget::Window::EmbeddedWindow) @@ -894,6 +920,11 @@ BEGIN_OBJECT_REFLECTOR(osgWidget::Window::EmbeddedWindow) __bool__setWindow__Window_P1, "", ""); + I_Method0(void, updateSizeFromWindow, + Properties::NON_VIRTUAL, + __void__updateSizeFromWindow, + "", + ""); I_Method0(osgWidget::Window *, getWindow, Properties::NON_VIRTUAL, __Window_P1__getWindow, diff --git a/src/osgWrappers/osgWidget/WindowManager.cpp b/src/osgWrappers/osgWidget/WindowManager.cpp index 62859b7c8..1dbcdfb25 100644 --- a/src/osgWrappers/osgWidget/WindowManager.cpp +++ b/src/osgWrappers/osgWidget/WindowManager.cpp @@ -35,9 +35,8 @@ BEGIN_ENUM_REFLECTOR(osgWidget::WindowManager::WmFlags) I_DeclaringFile("osgWidget/WindowManager"); I_EnumLabel(osgWidget::WindowManager::WM_USE_LUA); I_EnumLabel(osgWidget::WindowManager::WM_USE_PYTHON); + I_EnumLabel(osgWidget::WindowManager::WM_USE_RENDERBINS); I_EnumLabel(osgWidget::WindowManager::WM_PICK_DEBUG); - I_EnumLabel(osgWidget::WindowManager::WM_NO_INVERT_Y); - I_EnumLabel(osgWidget::WindowManager::WM_NO_BETA_WARN); END_REFLECTOR BEGIN_ENUM_REFLECTOR(osgWidget::WindowManager::PointerDirection) @@ -117,6 +116,16 @@ BEGIN_OBJECT_REFLECTOR(osgWidget::WindowManager) __void__resizeAllWindows__bool, "", ""); + I_Method2(osgWidget::XYCoord, windowXY, IN, double, x, IN, double, x, + Properties::NON_VIRTUAL, + __XYCoord__windowXY__double__double, + "", + ""); + I_Method2(osgWidget::XYCoord, localXY, IN, double, x, IN, double, x, + Properties::NON_VIRTUAL, + __XYCoord__localXY__double__double, + "", + ""); I_Method2(bool, pointerMove, IN, float, x, IN, float, x, Properties::NON_VIRTUAL, __bool__pointerMove__float__float, @@ -162,9 +171,9 @@ BEGIN_OBJECT_REFLECTOR(osgWidget::WindowManager) __bool__isUsingPython, "", ""); - I_Method0(bool, isInvertedY, + I_Method0(bool, isUsingRenderBins, Properties::NON_VIRTUAL, - __bool__isInvertedY, + __bool__isUsingRenderBins, "", ""); I_Method0(int, getMouseKeysDown, @@ -307,6 +316,11 @@ BEGIN_OBJECT_REFLECTOR(osgWidget::WindowManager) __void__setSize__point_type__point_type, "", ""); + I_Method2(void, setWindowSize, IN, osgWidget::point_type, w, IN, osgWidget::point_type, h, + Properties::NON_VIRTUAL, + __void__setWindowSize__point_type__point_type, + "", + ""); I_Method2(bool, mousePushedLeft, IN, float, x, IN, float, y, Properties::NON_VIRTUAL, __bool__mousePushedLeft__float__float,