VTK  9.7.20261101
vtkScivisWidgets.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
3
33
34#ifndef vtkScivisWidgets_h
35#define vtkScivisWidgets_h
36
37#include "vtkObject.h"
38#include "vtkViewsScivisModule.h" // For export macro
39#include "vtkWeakPointer.h" // For ivar
40#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
41
42VTK_ABI_NAMESPACE_BEGIN
44class vtkAngleWidget;
45class vtkBoxWidget2;
49class vtkLineWidget2;
50class vtkScivisView;
52
53class VTKVIEWSSCIVIS_EXPORT VTK_MARSHALAUTO vtkScivisWidgets : public vtkObject
54{
55public:
58 void PrintSelf(ostream& os, vtkIndent indent) override;
59
61
70
74 vtkCaptionWidget* AddCaption(const char* text, double x, double y, double z);
75
77
85 vtkSplineWidget2* AddSpline(int handles = 5);
87
89
94 void Add(vtkAbstractWidget* widget);
97 void RemoveAll();
99
101
107
108protected:
111
112private:
113 friend class vtkScivisView;
114
115 // Held weakly, as the other components hold it: these are reached through the
116 // view, but Python can outlive it.
117 void SetView(vtkScivisView* view);
118
119 vtkScivisWidgets(const vtkScivisWidgets&) = delete;
120 void operator=(const vtkScivisWidgets&) = delete;
121
123
124 class Internals;
125 Internals* Implementation;
126};
127
128VTK_ABI_NAMESPACE_END
129#endif
define the API for widget / widget representation
measure the angle between two rays (defined by three points)
3D widget for manipulating a box
widget for placing a caption (text plus leader)
measure the distance between two points
3D widget for manipulating an infinite plane
a simple class to control print indentation
Definition vtkIndent.h:108
3D widget for manipulating a finite, straight line
A ready-made rendering assembly for scientific visualization.
vtkAbstractWidget * GetWidget(int index)
The widgets being held, in the order they were added.
void Add(vtkAbstractWidget *widget)
Add a widget of any kind, or take one away.
vtkDistanceWidget * AddDistance()
Measure the scene.
~vtkScivisWidgets() override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSplineWidget2 * AddSpline(int handles=5)
A line between two points, a plane to cut with, a box to crop to, or a spline through handles points.
void RemoveAll()
Add a widget of any kind, or take one away.
vtkLineWidget2 * AddLine()
A line between two points, a plane to cut with, a box to crop to, or a spline through handles points.
friend class vtkScivisView
vtkImplicitPlaneWidget2 * AddPlane()
A line between two points, a plane to cut with, a box to crop to, or a spline through handles points.
static vtkScivisWidgets * New()
int GetNumberOfWidgets()
The widgets being held, in the order they were added.
vtkCaptionWidget * AddCaption(const char *text, double x, double y, double z)
A label with a leader pointing at (x, y, z), in world coordinates.
vtkAngleWidget * AddAngle()
Measure the scene.
vtkBoxWidget2 * AddBox()
A line between two points, a plane to cut with, a box to crop to, or a spline through handles points.
void Remove(vtkAbstractWidget *widget)
Add a widget of any kind, or take one away.
void PlaceOverScene(vtkAbstractWidget *widget)
Add a widget of any kind, or take one away.
widget for vtkSplineRepresentation.
a weak reference to a vtkObject.
#define VTK_MARSHALAUTO