VTK  9.2.6
vtkPythonItem.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkPythonItem.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
15
30#ifndef vtkPythonItem_h
31#define vtkPythonItem_h
32#if !defined(__VTK_WRAP__) || defined(__VTK_WRAP_HIERARCHY__) || defined(__VTK_WRAP_PYTHON__)
33
34#include "vtkPython.h" // Must be first
35
36#include "vtkContextItem.h"
37#include "vtkPythonContext2DModule.h" // For export macro
38
39class vtkSmartPyObject;
40
41class VTKPYTHONCONTEXT2D_EXPORT vtkPythonItem : public vtkContextItem
42{
43public:
45 void PrintSelf(ostream& os, vtkIndent indent) override;
46
47 static vtkPythonItem* New();
48
56
57 bool Paint(vtkContext2D* painter) override;
58
59protected:
61 ~vtkPythonItem() override;
62
63private:
64 vtkPythonItem(const vtkPythonItem&) = delete;
65 void operator=(const vtkPythonItem&) = delete;
66
67 bool CheckResult(const char* method, const vtkSmartPyObject& res);
68
69 PyObject* Object;
70};
71
72#endif // #ifndef vtkPythonItem_h
73#endif
Class for drawing 2D primitives to a graphical context.
base class for items that are part of a vtkContextScene.
a simple class to control print indentation
Definition vtkIndent.h:40
A vtkContextItem that can be implemented in Python.
bool Paint(vtkContext2D *painter) override
Paint event for the item, called whenever the item needs to be drawn.
void SetPythonObject(PyObject *obj)
Specify the Python object to use to operate on the data.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkPythonItem() override
static vtkPythonItem * New()
struct _object PyObject