// python wrapper for vtkContinuousValueWidgetRepresentation // #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 "vtkContinuousValueWidgetRepresentation.h" extern "C" { VTK_ABI_EXPORT void PyVTKAddFile_vtkContinuousValueWidgetRepresentation(PyObject *); } extern "C" { VTK_ABI_EXPORT PyObject *PyvtkContinuousValueWidgetRepresentation_ClassNew(); } #ifndef DECLARED_PyvtkWidgetRepresentation_ClassNew extern "C" { PyObject *PyvtkWidgetRepresentation_ClassNew(); } #define DECLARED_PyvtkWidgetRepresentation_ClassNew #endif static const char *PyvtkContinuousValueWidgetRepresentation_Doc = "vtkContinuousValueWidgetRepresentation - provide the representation\nfor a continuous value\n\n" "Superclass: vtkWidgetRepresentation\n\n" "This class is used mainly as a superclass for continuous value\n" "widgets\n\n"; static PyTypeObject PyvtkContinuousValueWidgetRepresentation__InteractionState_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "vtkInteractionWidgetsPython.vtkContinuousValueWidgetRepresentation._InteractionState", // tp_name sizeof(PyIntObject), // tp_basicsize 0, // tp_itemsize nullptr, // tp_dealloc 0, // tp_print nullptr, // tp_getattr nullptr, // tp_setattr nullptr, // tp_compare nullptr, // tp_repr nullptr, // tp_as_number nullptr, // tp_as_sequence nullptr, // tp_as_mapping nullptr, // tp_hash nullptr, // tp_call nullptr, // tp_str nullptr, // tp_getattro nullptr, // tp_setattro nullptr, // tp_as_buffer Py_TPFLAGS_DEFAULT, // tp_flags nullptr, // tp_doc nullptr, // tp_traverse nullptr, // tp_clear nullptr, // tp_richcompare 0, // tp_weaklistoffset nullptr, // tp_iter nullptr, // tp_iternext nullptr, // tp_methods nullptr, // tp_members nullptr, // tp_getset &PyInt_Type, // tp_base nullptr, // tp_dict nullptr, // tp_descr_get nullptr, // tp_descr_set 0, // tp_dictoffset nullptr, // tp_init nullptr, // tp_alloc nullptr, // tp_new PyObject_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 }; PyObject *PyvtkContinuousValueWidgetRepresentation__InteractionState_FromEnum(int val) { #ifdef VTK_PY3K PyObject *args = Py_BuildValue("(i)", val); PyObject *obj = PyLong_Type.tp_new(&PyvtkContinuousValueWidgetRepresentation__InteractionState_Type, args, nullptr); Py_DECREF(args); return obj; #else PyIntObject *self = PyObject_New(PyIntObject, &PyvtkContinuousValueWidgetRepresentation__InteractionState_Type); self->ob_ival = val; return (PyObject *)self; #endif } static PyObject * PyvtkContinuousValueWidgetRepresentation_IsTypeOf(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "IsTypeOf"); char *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = vtkContinuousValueWidgetRepresentation::IsTypeOf(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkContinuousValueWidgetRepresentation_IsA(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsA"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkContinuousValueWidgetRepresentation *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->vtkContinuousValueWidgetRepresentation::IsA(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkContinuousValueWidgetRepresentation_SafeDownCast(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "SafeDownCast"); vtkObjectBase *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkObjectBase")) { vtkContinuousValueWidgetRepresentation *tempr = vtkContinuousValueWidgetRepresentation::SafeDownCast(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkContinuousValueWidgetRepresentation_NewInstance(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "NewInstance"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkContinuousValueWidgetRepresentation *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkContinuousValueWidgetRepresentation *tempr = (ap.IsBound() ? op->NewInstance() : op->vtkContinuousValueWidgetRepresentation::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 * PyvtkContinuousValueWidgetRepresentation_PlaceWidget(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "PlaceWidget"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkContinuousValueWidgetRepresentation *op = static_cast(vp); const int size0 = 6; double temp0[6]; double save0[6]; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetArray(temp0, size0)) { ap.SaveArray(temp0, save0, size0); if (ap.IsBound()) { op->PlaceWidget(temp0); } else { op->vtkContinuousValueWidgetRepresentation::PlaceWidget(temp0); } if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkContinuousValueWidgetRepresentation_BuildRepresentation(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "BuildRepresentation"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkContinuousValueWidgetRepresentation *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->BuildRepresentation(); } else { op->vtkContinuousValueWidgetRepresentation::BuildRepresentation(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkContinuousValueWidgetRepresentation_StartWidgetInteraction(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "StartWidgetInteraction"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkContinuousValueWidgetRepresentation *op = static_cast(vp); const int size0 = 2; double temp0[2]; double save0[2]; PyObject *result = nullptr; if (op && !ap.IsPureVirtual() && ap.CheckArgCount(1) && ap.GetArray(temp0, size0)) { ap.SaveArray(temp0, save0, size0); op->StartWidgetInteraction(temp0); if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkContinuousValueWidgetRepresentation_WidgetInteraction(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "WidgetInteraction"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkContinuousValueWidgetRepresentation *op = static_cast(vp); const int size0 = 2; double temp0[2]; double save0[2]; PyObject *result = nullptr; if (op && !ap.IsPureVirtual() && ap.CheckArgCount(1) && ap.GetArray(temp0, size0)) { ap.SaveArray(temp0, save0, size0); op->WidgetInteraction(temp0); if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkContinuousValueWidgetRepresentation_SetValue(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetValue"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkContinuousValueWidgetRepresentation *op = static_cast(vp); double temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetValue(temp0); } else { op->vtkContinuousValueWidgetRepresentation::SetValue(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkContinuousValueWidgetRepresentation_GetValue(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetValue"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkContinuousValueWidgetRepresentation *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { double tempr = (ap.IsBound() ? op->GetValue() : op->vtkContinuousValueWidgetRepresentation::GetValue()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyMethodDef PyvtkContinuousValueWidgetRepresentation_Methods[] = { {"IsTypeOf", PyvtkContinuousValueWidgetRepresentation_IsTypeOf, METH_VARARGS, "V.IsTypeOf(string) -> int\nC++: static vtkTypeBool IsTypeOf(const char *type)\n\nStandard methods for the class.\n"}, {"IsA", PyvtkContinuousValueWidgetRepresentation_IsA, METH_VARARGS, "V.IsA(string) -> int\nC++: vtkTypeBool IsA(const char *type) override;\n\nStandard methods for the class.\n"}, {"SafeDownCast", PyvtkContinuousValueWidgetRepresentation_SafeDownCast, METH_VARARGS, "V.SafeDownCast(vtkObjectBase)\n -> vtkContinuousValueWidgetRepresentation\nC++: static vtkContinuousValueWidgetRepresentation *SafeDownCast(\n vtkObjectBase *o)\n\nStandard methods for the class.\n"}, {"NewInstance", PyvtkContinuousValueWidgetRepresentation_NewInstance, METH_VARARGS, "V.NewInstance() -> vtkContinuousValueWidgetRepresentation\nC++: vtkContinuousValueWidgetRepresentation *NewInstance()\n\nStandard methods for the class.\n"}, {"PlaceWidget", PyvtkContinuousValueWidgetRepresentation_PlaceWidget, METH_VARARGS, "V.PlaceWidget([float, float, float, float, float, float])\nC++: void PlaceWidget(double bounds[6]) override;\n\nMethods to interface with the vtkSliderWidget. The PlaceWidget()\nmethod assumes that the parameter bounds[6] specifies the\nlocation in display space where the widget should be placed.\n"}, {"BuildRepresentation", PyvtkContinuousValueWidgetRepresentation_BuildRepresentation, METH_VARARGS, "V.BuildRepresentation()\nC++: void BuildRepresentation() override;\n\nMethods to interface with the vtkSliderWidget. The PlaceWidget()\nmethod assumes that the parameter bounds[6] specifies the\nlocation in display space where the widget should be placed.\n"}, {"StartWidgetInteraction", PyvtkContinuousValueWidgetRepresentation_StartWidgetInteraction, METH_VARARGS, "V.StartWidgetInteraction([float, float])\nC++: void StartWidgetInteraction(double eventPos[2]) override = 0;\n\nMethods to interface with the vtkSliderWidget. The PlaceWidget()\nmethod assumes that the parameter bounds[6] specifies the\nlocation in display space where the widget should be placed.\n"}, {"WidgetInteraction", PyvtkContinuousValueWidgetRepresentation_WidgetInteraction, METH_VARARGS, "V.WidgetInteraction([float, float])\nC++: void WidgetInteraction(double eventPos[2]) override = 0;\n\nMethods to interface with the vtkSliderWidget. The PlaceWidget()\nmethod assumes that the parameter bounds[6] specifies the\nlocation in display space where the widget should be placed.\n"}, {"SetValue", PyvtkContinuousValueWidgetRepresentation_SetValue, METH_VARARGS, "V.SetValue(float)\nC++: virtual void SetValue(double value)\n\n"}, {"GetValue", PyvtkContinuousValueWidgetRepresentation_GetValue, METH_VARARGS, "V.GetValue() -> float\nC++: virtual double GetValue()\n\n"}, {nullptr, nullptr, 0, nullptr} }; static PyTypeObject PyvtkContinuousValueWidgetRepresentation_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "vtkInteractionWidgetsPython.vtkContinuousValueWidgetRepresentation", // 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 PyvtkContinuousValueWidgetRepresentation_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 }; PyObject *PyvtkContinuousValueWidgetRepresentation_ClassNew() { PyVTKClass_Add( &PyvtkContinuousValueWidgetRepresentation_Type, PyvtkContinuousValueWidgetRepresentation_Methods, "vtkContinuousValueWidgetRepresentation", nullptr); PyTypeObject *pytype = &PyvtkContinuousValueWidgetRepresentation_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 *)PyvtkWidgetRepresentation_ClassNew(); PyObject *d = pytype->tp_dict; PyObject *o; PyType_Ready(&PyvtkContinuousValueWidgetRepresentation__InteractionState_Type); PyvtkContinuousValueWidgetRepresentation__InteractionState_Type.tp_new = nullptr; vtkPythonUtil::AddEnumToMap(&PyvtkContinuousValueWidgetRepresentation__InteractionState_Type); o = (PyObject *)&PyvtkContinuousValueWidgetRepresentation__InteractionState_Type; if (PyDict_SetItemString(d, "_InteractionState", o) != 0) { Py_DECREF(o); } for (int c = 0; c < 3; c++) { typedef vtkContinuousValueWidgetRepresentation::_InteractionState cxx_enum_type; static const struct { const char *name; cxx_enum_type value; } constants[3] = { { "Outside", vtkContinuousValueWidgetRepresentation::Outside }, { "Inside", vtkContinuousValueWidgetRepresentation::Inside }, { "Adjusting", vtkContinuousValueWidgetRepresentation::Adjusting }, }; o = PyvtkContinuousValueWidgetRepresentation__InteractionState_FromEnum(constants[c].value); if (o) { PyDict_SetItemString(d, constants[c].name, o); Py_DECREF(o); } } PyType_Ready(pytype); return (PyObject *)pytype; } void PyVTKAddFile_vtkContinuousValueWidgetRepresentation( PyObject *dict) { PyObject *o; o = PyvtkContinuousValueWidgetRepresentation_ClassNew(); if (o && PyDict_SetItemString(dict, "vtkContinuousValueWidgetRepresentation", o) != 0) { Py_DECREF(o); } }