// python wrapper for vtkTreeMapView // #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 "vtkTreeMapView.h" extern "C" { VTK_ABI_EXPORT void PyVTKAddFile_vtkTreeMapView(PyObject *); } extern "C" { VTK_ABI_EXPORT PyObject *PyvtkTreeMapView_ClassNew(); } #ifndef DECLARED_PyvtkTreeAreaView_ClassNew extern "C" { PyObject *PyvtkTreeAreaView_ClassNew(); } #define DECLARED_PyvtkTreeAreaView_ClassNew #endif static const char *PyvtkTreeMapView_Doc = "vtkTreeMapView - Displays a tree as a tree map.\n\n" "Superclass: vtkTreeAreaView\n\n" "vtkTreeMapView shows a vtkTree in a tree map, where each vertex in\n" "the tree is represented by a box. Child boxes are contained within\n" "the parent box, and may be colored and sized by various parameters.\n\n"; static PyObject * PyvtkTreeMapView_IsTypeOf(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "IsTypeOf"); char *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = vtkTreeMapView::IsTypeOf(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkTreeMapView_IsA(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsA"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTreeMapView *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->vtkTreeMapView::IsA(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkTreeMapView_SafeDownCast(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "SafeDownCast"); vtkObjectBase *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkObjectBase")) { vtkTreeMapView *tempr = vtkTreeMapView::SafeDownCast(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkTreeMapView_NewInstance(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "NewInstance"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTreeMapView *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkTreeMapView *tempr = (ap.IsBound() ? op->NewInstance() : op->vtkTreeMapView::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 * PyvtkTreeMapView_SetLayoutStrategy_s1(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetLayoutStrategy"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTreeMapView *op = static_cast(vp); vtkAreaLayoutStrategy *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkAreaLayoutStrategy")) { if (ap.IsBound()) { op->SetLayoutStrategy(temp0); } else { op->vtkTreeMapView::SetLayoutStrategy(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkTreeMapView_SetLayoutStrategy_s2(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetLayoutStrategy"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTreeMapView *op = static_cast(vp); char *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetLayoutStrategy(temp0); } else { op->vtkTreeMapView::SetLayoutStrategy(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyMethodDef PyvtkTreeMapView_SetLayoutStrategy_Methods[] = { {nullptr, PyvtkTreeMapView_SetLayoutStrategy_s1, METH_VARARGS, "@V *vtkAreaLayoutStrategy"}, {nullptr, PyvtkTreeMapView_SetLayoutStrategy_s2, METH_VARARGS, "@z"}, {nullptr, nullptr, 0, nullptr} }; static PyObject * PyvtkTreeMapView_SetLayoutStrategy(PyObject *self, PyObject *args) { PyMethodDef *methods = PyvtkTreeMapView_SetLayoutStrategy_Methods; int nargs = vtkPythonArgs::GetArgCount(self, args); switch(nargs) { case 1: return vtkPythonOverload::CallMethod(methods, self, args); } vtkPythonArgs::ArgCountError(nargs, "SetLayoutStrategy"); return nullptr; } static PyObject * PyvtkTreeMapView_SetLayoutStrategyToBox(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetLayoutStrategyToBox"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTreeMapView *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->SetLayoutStrategyToBox(); } else { op->vtkTreeMapView::SetLayoutStrategyToBox(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkTreeMapView_SetLayoutStrategyToSliceAndDice(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetLayoutStrategyToSliceAndDice"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTreeMapView *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->SetLayoutStrategyToSliceAndDice(); } else { op->vtkTreeMapView::SetLayoutStrategyToSliceAndDice(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkTreeMapView_SetLayoutStrategyToSquarify(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetLayoutStrategyToSquarify"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTreeMapView *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->SetLayoutStrategyToSquarify(); } else { op->vtkTreeMapView::SetLayoutStrategyToSquarify(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkTreeMapView_SetFontSizeRange(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetFontSizeRange"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTreeMapView *op = static_cast(vp); int temp0; int temp1; int temp2 = 4; PyObject *result = nullptr; if (op && ap.CheckArgCount(2, 3) && ap.GetValue(temp0) && ap.GetValue(temp1) && (ap.NoArgsLeft() || ap.GetValue(temp2))) { if (ap.IsBound()) { op->SetFontSizeRange(temp0, temp1, temp2); } else { op->vtkTreeMapView::SetFontSizeRange(temp0, temp1, temp2); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkTreeMapView_GetFontSizeRange(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetFontSizeRange"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTreeMapView *op = static_cast(vp); const int size0 = 3; int temp0[3]; int save0[3]; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetArray(temp0, size0)) { ap.SaveArray(temp0, save0, size0); if (ap.IsBound()) { op->GetFontSizeRange(temp0); } else { op->vtkTreeMapView::GetFontSizeRange(temp0); } if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyMethodDef PyvtkTreeMapView_Methods[] = { {"IsTypeOf", PyvtkTreeMapView_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", PyvtkTreeMapView_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", PyvtkTreeMapView_SafeDownCast, METH_VARARGS, "V.SafeDownCast(vtkObjectBase) -> vtkTreeMapView\nC++: static vtkTreeMapView *SafeDownCast(vtkObjectBase *o)\n\n"}, {"NewInstance", PyvtkTreeMapView_NewInstance, METH_VARARGS, "V.NewInstance() -> vtkTreeMapView\nC++: vtkTreeMapView *NewInstance()\n\n"}, {"SetLayoutStrategy", PyvtkTreeMapView_SetLayoutStrategy, METH_VARARGS, "V.SetLayoutStrategy(vtkAreaLayoutStrategy)\nC++: void SetLayoutStrategy(vtkAreaLayoutStrategy *s) override;\nV.SetLayoutStrategy(string)\nC++: virtual void SetLayoutStrategy(const char *name)\n\nSets the treemap layout strategy\n"}, {"SetLayoutStrategyToBox", PyvtkTreeMapView_SetLayoutStrategyToBox, METH_VARARGS, "V.SetLayoutStrategyToBox()\nC++: virtual void SetLayoutStrategyToBox()\n\nSets the treemap layout strategy\n"}, {"SetLayoutStrategyToSliceAndDice", PyvtkTreeMapView_SetLayoutStrategyToSliceAndDice, METH_VARARGS, "V.SetLayoutStrategyToSliceAndDice()\nC++: virtual void SetLayoutStrategyToSliceAndDice()\n\nSets the treemap layout strategy\n"}, {"SetLayoutStrategyToSquarify", PyvtkTreeMapView_SetLayoutStrategyToSquarify, METH_VARARGS, "V.SetLayoutStrategyToSquarify()\nC++: virtual void SetLayoutStrategyToSquarify()\n\nSets the treemap layout strategy\n"}, {"SetFontSizeRange", PyvtkTreeMapView_SetFontSizeRange, METH_VARARGS, "V.SetFontSizeRange(int, int, int)\nC++: virtual void SetFontSizeRange(const int maxSize,\n const int minSize, const int delta=4)\n\nThe sizes of the fonts used for labeling.\n"}, {"GetFontSizeRange", PyvtkTreeMapView_GetFontSizeRange, METH_VARARGS, "V.GetFontSizeRange([int, int, int])\nC++: virtual void GetFontSizeRange(int range[3])\n\nThe sizes of the fonts used for labeling.\n"}, {nullptr, nullptr, 0, nullptr} }; static PyTypeObject PyvtkTreeMapView_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "vtkViewsInfovisPython.vtkTreeMapView", // 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 PyvtkTreeMapView_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 *PyvtkTreeMapView_StaticNew() { return vtkTreeMapView::New(); } PyObject *PyvtkTreeMapView_ClassNew() { PyVTKClass_Add( &PyvtkTreeMapView_Type, PyvtkTreeMapView_Methods, "vtkTreeMapView", &PyvtkTreeMapView_StaticNew); PyTypeObject *pytype = &PyvtkTreeMapView_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 *)PyvtkTreeAreaView_ClassNew(); PyType_Ready(pytype); return (PyObject *)pytype; } void PyVTKAddFile_vtkTreeMapView( PyObject *dict) { PyObject *o; o = PyvtkTreeMapView_ClassNew(); if (o && PyDict_SetItemString(dict, "vtkTreeMapView", o) != 0) { Py_DECREF(o); } }