VTK  9.7.20260916
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
52VTK_ABI_NAMESPACE_BEGIN
55class vtkScivisView;
56
57class VTKVIEWSSCIVIS_EXPORT vtkScivisScalarBars : public vtkObject
58{
59public:
62 void PrintSelf(ostream& os, vtkIndent indent) override;
63
65
67
73 void SetAutoVisibility(bool val);
75 vtkBooleanMacro(AutoVisibility, bool);
77
79
87 void SetDraggable(bool val);
89 vtkBooleanMacro(Draggable, bool);
91
97
99
103 const char* GetArrayName(int index);
104 int GetFieldAssociation(int index);
106
108
113 vtkScalarBarActor* GetActor(const char* arrayName, int fieldAssoc);
115
122
123protected:
126
127private:
128 friend class vtkScivisView;
129
130 // Held weakly, as the other components hold it: these are reached through the
131 // view, but Python can outlive it.
132 void SetView(vtkScivisView* view);
133
139 void Update();
140
144 void Position();
145
149 void UpdateWidgets();
150
154 void OnDragged(vtkObject* caller, unsigned long event, void* data);
155
157 void operator=(const vtkScivisScalarBars&) = delete;
158
160 bool AutoVisibility;
161 bool Draggable;
162
163 class Internals;
164 Internals* Implementation;
165};
166
167VTK_ABI_NAMESPACE_END
168#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