VTK  9.7.20261007
vtkScivisScalarBars.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
44
45#ifndef vtkScivisScalarBars_h
46#define vtkScivisScalarBars_h
47
48#include "vtkObject.h"
49#include "vtkViewsScivisModule.h" // For export macro
50#include "vtkWeakPointer.h" // For ivar
51#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
52
53VTK_ABI_NAMESPACE_BEGIN
56class vtkScivisView;
57
58class VTKVIEWSSCIVIS_EXPORT VTK_MARSHALAUTO vtkScivisScalarBars : public vtkObject
59{
60public:
63 void PrintSelf(ostream& os, vtkIndent indent) override;
64
66
68
74 void SetAutoVisibility(bool val);
76 vtkBooleanMacro(AutoVisibility, bool);
78
80
88 void SetDraggable(bool val);
90 vtkBooleanMacro(Draggable, bool);
92
98
100
104 const char* GetArrayName(int index);
105 int GetFieldAssociation(int index);
107
109
114 vtkScalarBarActor* GetActor(const char* arrayName, int fieldAssoc);
116
123
124protected:
127
128private:
129 friend class vtkScivisView;
130
131 // Held weakly, as the other components hold it: these are reached through the
132 // view, but Python can outlive it.
133 void SetView(vtkScivisView* view);
134
140 void Update();
141
145 void Position();
146
150 void UpdateWidgets();
151
155 void OnDragged(vtkObject* caller, unsigned long event, void* data);
156
158 void operator=(const vtkScivisScalarBars&) = delete;
159
161 bool AutoVisibility;
162 bool Draggable;
163
164 class Internals;
165 Internals* Implementation;
166};
167
168VTK_ABI_NAMESPACE_END
169#endif
a simple class to control print indentation
Definition vtkIndent.h:108
Create a scalar bar with labels.
2D widget for manipulating a scalar bar
const char * GetArrayName(int index)
What the bar at index is labelled with, in array-name order.
int GetNumberOfBars()
How many bars there are, which is how many arrays the visible representations are drawing between the...
vtkScalarBarActor * GetActor(int index)
The bar at index, or the one labelled with arrayName drawn from fieldAssoc.
vtkMTimeType GetMTime() override
Return this object's modified time.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetAutoVisibility(bool val)
Whether a bar is kept for each array being drawn.
bool GetDraggable()
Whether the user can pick a bar up and move it.
int GetFieldAssociation(int index)
What the bar at index is labelled with, in array-name order.
void SetDraggable(bool val)
Whether the user can pick a bar up and move it.
~vtkScivisScalarBars() override
static vtkScivisScalarBars * New()
vtkScalarBarActor * GetActor(const char *arrayName, int fieldAssoc)
The bar at index, or the one labelled with arrayName drawn from fieldAssoc.
vtkScalarBarWidget * GetWidget(int index)
The widget that makes the bar at index draggable, for its interaction and its representation.
bool GetAutoVisibility()
Whether a bar is kept for each array being drawn.
A ready-made rendering assembly for scientific visualization.
a weak reference to a vtkObject.
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:318
#define VTK_MARSHALAUTO