// python wrapper for vtkInteractorStyleRubberBand2D // #define VTK_WRAPPING_CXX #define VTK_STREAMS_FWD_ONLY #include "vtkPythonArgs.h" #include "vtkPythonOverload.h" #include "vtkConfigure.h" #include #include #include "vtkVariant.h" #include "vtkIndent.h" #include "vtkInteractorStyleRubberBand2D.h" extern "C" { VTK_ABI_EXPORT void PyVTKAddFile_vtkInteractorStyleRubberBand2D(PyObject *); } extern "C" { VTK_ABI_EXPORT PyObject *PyvtkInteractorStyleRubberBand2D_ClassNew(); } #ifndef DECLARED_PyvtkInteractorStyle_ClassNew extern "C" { PyObject *PyvtkInteractorStyle_ClassNew(); } #define DECLARED_PyvtkInteractorStyle_ClassNew #endif static const char *PyvtkInteractorStyleRubberBand2D_Doc = "vtkInteractorStyleRubberBand2D - A rubber band interactor for a 2D\nview\n\n" "Superclass: vtkInteractorStyle\n\n" "vtkInteractorStyleRubberBand2D manages interaction in a 2D view.\n" "Camera rotation is not allowed with this interactor style. Zooming\n" "affects the camera's parallel scale only, and assumes that the camera\n" "is in parallel projection mode. The style also allows draws a rubber\n" "band using the left button. All camera changes invoke\n" "StartInteractionEvent when the button is pressed, InteractionEvent\n" "when the mouse (or wheel) is moved, and EndInteractionEvent when the\n" "button is released. The bindings are as follows: Left mouse - Select\n" "(invokes a SelectionChangedEvent). Right mouse - Zoom. Middle mouse -\n" "Pan. Scroll wheel - Zoom.\n\n"; static PyObject * PyvtkInteractorStyleRubberBand2D_IsTypeOf(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "IsTypeOf"); char *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = vtkInteractorStyleRubberBand2D::IsTypeOf(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkInteractorStyleRubberBand2D_IsA(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsA"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkInteractorStyleRubberBand2D *op = static_cast(vp); char *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = (ap.IsBound() ? op->IsA(temp0) : op->vtkInteractorStyleRubberBand2D::IsA(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkInteractorStyleRubberBand2D_SafeDownCast(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "SafeDownCast"); vtkObjectBase *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkObjectBase")) { vtkInteractorStyleRubberBand2D *tempr = vtkInteractorStyleRubberBand2D::SafeDownCast(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkInteractorStyleRubberBand2D_NewInstance(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "NewInstance"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkInteractorStyleRubberBand2D *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkInteractorStyleRubberBand2D *tempr = (ap.IsBound() ? op->NewInstance() : op->vtkInteractorStyleRubberBand2D::NewInstance()); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); if (result && PyVTKObject_Check(result)) { PyVTKObject_GetObject(result)->UnRegister(0); PyVTKObject_SetFlag(result, VTK_PYTHON_IGNORE_UNREGISTER, 1); } } } return result; } static PyObject * PyvtkInteractorStyleRubberBand2D_OnLeftButtonDown(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "OnLeftButtonDown"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkInteractorStyleRubberBand2D *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->OnLeftButtonDown(); } else { op->vtkInteractorStyleRubberBand2D::OnLeftButtonDown(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkInteractorStyleRubberBand2D_OnLeftButtonUp(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "OnLeftButtonUp"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkInteractorStyleRubberBand2D *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->OnLeftButtonUp(); } else { op->vtkInteractorStyleRubberBand2D::OnLeftButtonUp(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkInteractorStyleRubberBand2D_OnMiddleButtonDown(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "OnMiddleButtonDown"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkInteractorStyleRubberBand2D *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->OnMiddleButtonDown(); } else { op->vtkInteractorStyleRubberBand2D::OnMiddleButtonDown(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkInteractorStyleRubberBand2D_OnMiddleButtonUp(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "OnMiddleButtonUp"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkInteractorStyleRubberBand2D *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->OnMiddleButtonUp(); } else { op->vtkInteractorStyleRubberBand2D::OnMiddleButtonUp(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkInteractorStyleRubberBand2D_OnRightButtonDown(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "OnRightButtonDown"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkInteractorStyleRubberBand2D *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->OnRightButtonDown(); } else { op->vtkInteractorStyleRubberBand2D::OnRightButtonDown(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkInteractorStyleRubberBand2D_OnRightButtonUp(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "OnRightButtonUp"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkInteractorStyleRubberBand2D *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->OnRightButtonUp(); } else { op->vtkInteractorStyleRubberBand2D::OnRightButtonUp(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkInteractorStyleRubberBand2D_OnMouseMove(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "OnMouseMove"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkInteractorStyleRubberBand2D *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->OnMouseMove(); } else { op->vtkInteractorStyleRubberBand2D::OnMouseMove(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkInteractorStyleRubberBand2D_OnMouseWheelForward(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "OnMouseWheelForward"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkInteractorStyleRubberBand2D *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->OnMouseWheelForward(); } else { op->vtkInteractorStyleRubberBand2D::OnMouseWheelForward(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkInteractorStyleRubberBand2D_OnMouseWheelBackward(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "OnMouseWheelBackward"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkInteractorStyleRubberBand2D *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->OnMouseWheelBackward(); } else { op->vtkInteractorStyleRubberBand2D::OnMouseWheelBackward(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkInteractorStyleRubberBand2D_SetRenderOnMouseMove(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetRenderOnMouseMove"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkInteractorStyleRubberBand2D *op = static_cast(vp); bool temp0 = false; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetRenderOnMouseMove(temp0); } else { op->vtkInteractorStyleRubberBand2D::SetRenderOnMouseMove(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkInteractorStyleRubberBand2D_GetRenderOnMouseMove(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetRenderOnMouseMove"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkInteractorStyleRubberBand2D *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { bool tempr = (ap.IsBound() ? op->GetRenderOnMouseMove() : op->vtkInteractorStyleRubberBand2D::GetRenderOnMouseMove()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkInteractorStyleRubberBand2D_RenderOnMouseMoveOn(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "RenderOnMouseMoveOn"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkInteractorStyleRubberBand2D *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->RenderOnMouseMoveOn(); } else { op->vtkInteractorStyleRubberBand2D::RenderOnMouseMoveOn(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkInteractorStyleRubberBand2D_RenderOnMouseMoveOff(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "RenderOnMouseMoveOff"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkInteractorStyleRubberBand2D *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->RenderOnMouseMoveOff(); } else { op->vtkInteractorStyleRubberBand2D::RenderOnMouseMoveOff(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkInteractorStyleRubberBand2D_GetInteraction(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetInteraction"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkInteractorStyleRubberBand2D *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetInteraction() : op->vtkInteractorStyleRubberBand2D::GetInteraction()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkInteractorStyleRubberBand2D_GetStartPosition(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetStartPosition"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkInteractorStyleRubberBand2D *op = static_cast(vp); int sizer = 2; PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int *tempr = (ap.IsBound() ? op->GetStartPosition() : op->vtkInteractorStyleRubberBand2D::GetStartPosition()); if (!ap.ErrorOccurred()) { result = ap.BuildTuple(tempr, sizer); } } return result; } static PyObject * PyvtkInteractorStyleRubberBand2D_GetEndPosition(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetEndPosition"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkInteractorStyleRubberBand2D *op = static_cast(vp); int sizer = 2; PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int *tempr = (ap.IsBound() ? op->GetEndPosition() : op->vtkInteractorStyleRubberBand2D::GetEndPosition()); if (!ap.ErrorOccurred()) { result = ap.BuildTuple(tempr, sizer); } } return result; } static PyMethodDef PyvtkInteractorStyleRubberBand2D_Methods[] = { {"IsTypeOf", PyvtkInteractorStyleRubberBand2D_IsTypeOf, METH_VARARGS, "V.IsTypeOf(string) -> int\nC++: static vtkTypeBool IsTypeOf(const char *type)\n\nReturn 1 if this class type is the same type of (or a subclass\nof) the named class. Returns 0 otherwise. This method works in\ncombination with vtkTypeMacro found in vtkSetGet.h.\n"}, {"IsA", PyvtkInteractorStyleRubberBand2D_IsA, METH_VARARGS, "V.IsA(string) -> int\nC++: vtkTypeBool IsA(const char *type) override;\n\nReturn 1 if this class is the same type of (or a subclass of) the\nnamed class. Returns 0 otherwise. This method works in\ncombination with vtkTypeMacro found in vtkSetGet.h.\n"}, {"SafeDownCast", PyvtkInteractorStyleRubberBand2D_SafeDownCast, METH_VARARGS, "V.SafeDownCast(vtkObjectBase) -> vtkInteractorStyleRubberBand2D\nC++: static vtkInteractorStyleRubberBand2D *SafeDownCast(\n vtkObjectBase *o)\n\n"}, {"NewInstance", PyvtkInteractorStyleRubberBand2D_NewInstance, METH_VARARGS, "V.NewInstance() -> vtkInteractorStyleRubberBand2D\nC++: vtkInteractorStyleRubberBand2D *NewInstance()\n\n"}, {"OnLeftButtonDown", PyvtkInteractorStyleRubberBand2D_OnLeftButtonDown, METH_VARARGS, "V.OnLeftButtonDown()\nC++: void OnLeftButtonDown() override;\n\n"}, {"OnLeftButtonUp", PyvtkInteractorStyleRubberBand2D_OnLeftButtonUp, METH_VARARGS, "V.OnLeftButtonUp()\nC++: void OnLeftButtonUp() override;\n\n"}, {"OnMiddleButtonDown", PyvtkInteractorStyleRubberBand2D_OnMiddleButtonDown, METH_VARARGS, "V.OnMiddleButtonDown()\nC++: void OnMiddleButtonDown() override;\n\n"}, {"OnMiddleButtonUp", PyvtkInteractorStyleRubberBand2D_OnMiddleButtonUp, METH_VARARGS, "V.OnMiddleButtonUp()\nC++: void OnMiddleButtonUp() override;\n\n"}, {"OnRightButtonDown", PyvtkInteractorStyleRubberBand2D_OnRightButtonDown, METH_VARARGS, "V.OnRightButtonDown()\nC++: void OnRightButtonDown() override;\n\n"}, {"OnRightButtonUp", PyvtkInteractorStyleRubberBand2D_OnRightButtonUp, METH_VARARGS, "V.OnRightButtonUp()\nC++: void OnRightButtonUp() override;\n\n"}, {"OnMouseMove", PyvtkInteractorStyleRubberBand2D_OnMouseMove, METH_VARARGS, "V.OnMouseMove()\nC++: void OnMouseMove() override;\n\nGeneric event bindings can be overridden in subclasses\n"}, {"OnMouseWheelForward", PyvtkInteractorStyleRubberBand2D_OnMouseWheelForward, METH_VARARGS, "V.OnMouseWheelForward()\nC++: void OnMouseWheelForward() override;\n\n"}, {"OnMouseWheelBackward", PyvtkInteractorStyleRubberBand2D_OnMouseWheelBackward, METH_VARARGS, "V.OnMouseWheelBackward()\nC++: void OnMouseWheelBackward() override;\n\n"}, {"SetRenderOnMouseMove", PyvtkInteractorStyleRubberBand2D_SetRenderOnMouseMove, METH_VARARGS, "V.SetRenderOnMouseMove(bool)\nC++: virtual void SetRenderOnMouseMove(bool _arg)\n\nWhether to invoke a render when the mouse moves.\n"}, {"GetRenderOnMouseMove", PyvtkInteractorStyleRubberBand2D_GetRenderOnMouseMove, METH_VARARGS, "V.GetRenderOnMouseMove() -> bool\nC++: virtual bool GetRenderOnMouseMove()\n\nWhether to invoke a render when the mouse moves.\n"}, {"RenderOnMouseMoveOn", PyvtkInteractorStyleRubberBand2D_RenderOnMouseMoveOn, METH_VARARGS, "V.RenderOnMouseMoveOn()\nC++: virtual void RenderOnMouseMoveOn()\n\nWhether to invoke a render when the mouse moves.\n"}, {"RenderOnMouseMoveOff", PyvtkInteractorStyleRubberBand2D_RenderOnMouseMoveOff, METH_VARARGS, "V.RenderOnMouseMoveOff()\nC++: virtual void RenderOnMouseMoveOff()\n\nWhether to invoke a render when the mouse moves.\n"}, {"GetInteraction", PyvtkInteractorStyleRubberBand2D_GetInteraction, METH_VARARGS, "V.GetInteraction() -> int\nC++: virtual int GetInteraction()\n\nCurrent interaction state\n"}, {"GetStartPosition", PyvtkInteractorStyleRubberBand2D_GetStartPosition, METH_VARARGS, "V.GetStartPosition() -> (int, int)\nC++: int *GetStartPosition()\n\n"}, {"GetEndPosition", PyvtkInteractorStyleRubberBand2D_GetEndPosition, METH_VARARGS, "V.GetEndPosition() -> (int, int)\nC++: int *GetEndPosition()\n\n"}, {nullptr, nullptr, 0, nullptr} }; static PyTypeObject PyvtkInteractorStyleRubberBand2D_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "vtkInteractionStylePython.vtkInteractorStyleRubberBand2D", // tp_name sizeof(PyVTKObject), // tp_basicsize 0, // tp_itemsize PyVTKObject_Delete, // tp_dealloc 0, // tp_print nullptr, // tp_getattr nullptr, // tp_setattr nullptr, // tp_compare PyVTKObject_Repr, // tp_repr nullptr, // tp_as_number nullptr, // tp_as_sequence nullptr, // tp_as_mapping nullptr, // tp_hash nullptr, // tp_call PyVTKObject_String, // tp_str PyObject_GenericGetAttr, // tp_getattro PyObject_GenericSetAttr, // tp_setattro &PyVTKObject_AsBuffer, // tp_as_buffer Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_BASETYPE, // tp_flags PyvtkInteractorStyleRubberBand2D_Doc, // tp_doc PyVTKObject_Traverse, // tp_traverse nullptr, // tp_clear nullptr, // tp_richcompare offsetof(PyVTKObject, vtk_weakreflist), // tp_weaklistoffset nullptr, // tp_iter nullptr, // tp_iternext nullptr, // tp_methods nullptr, // tp_members PyVTKObject_GetSet, // tp_getset nullptr, // tp_base nullptr, // tp_dict nullptr, // tp_descr_get nullptr, // tp_descr_set offsetof(PyVTKObject, vtk_dict), // tp_dictoffset nullptr, // tp_init nullptr, // tp_alloc PyVTKObject_New, // tp_new PyObject_GC_Del, // tp_free nullptr, // tp_is_gc nullptr, // tp_bases nullptr, // tp_mro nullptr, // tp_cache nullptr, // tp_subclasses nullptr, // tp_weaklist VTK_WRAP_PYTHON_SUPPRESS_UNINITIALIZED }; static vtkObjectBase *PyvtkInteractorStyleRubberBand2D_StaticNew() { return vtkInteractorStyleRubberBand2D::New(); } PyObject *PyvtkInteractorStyleRubberBand2D_ClassNew() { PyVTKClass_Add( &PyvtkInteractorStyleRubberBand2D_Type, PyvtkInteractorStyleRubberBand2D_Methods, "vtkInteractorStyleRubberBand2D", &PyvtkInteractorStyleRubberBand2D_StaticNew); PyTypeObject *pytype = &PyvtkInteractorStyleRubberBand2D_Type; if ((pytype->tp_flags & Py_TPFLAGS_READY) != 0) { return (PyObject *)pytype; } #if !defined(VTK_PY3K) && PY_VERSION_HEX >= 0x02060000 pytype->tp_flags |= Py_TPFLAGS_HAVE_NEWBUFFER; #endif pytype->tp_base = (PyTypeObject *)PyvtkInteractorStyle_ClassNew(); PyObject *d = pytype->tp_dict; PyObject *o; for (int c = 0; c < 6; c++) { static const struct { const char *name; int value; } constants[6] = { { "SELECT_NORMAL", vtkInteractorStyleRubberBand2D::SELECT_NORMAL }, { "SELECT_UNION", vtkInteractorStyleRubberBand2D::SELECT_UNION }, { "NONE", vtkInteractorStyleRubberBand2D::NONE }, { "PANNING", vtkInteractorStyleRubberBand2D::PANNING }, { "ZOOMING", vtkInteractorStyleRubberBand2D::ZOOMING }, { "SELECTING", vtkInteractorStyleRubberBand2D::SELECTING }, }; o = PyInt_FromLong(constants[c].value); if (o) { PyDict_SetItemString(d, constants[c].name, o); Py_DECREF(o); } } PyType_Ready(pytype); return (PyObject *)pytype; } void PyVTKAddFile_vtkInteractorStyleRubberBand2D( PyObject *dict) { PyObject *o; o = PyvtkInteractorStyleRubberBand2D_ClassNew(); if (o && PyDict_SetItemString(dict, "vtkInteractorStyleRubberBand2D", o) != 0) { Py_DECREF(o); } }