VTK  9.7.20260805
vtkViewTheme.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3// SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
19
20#ifndef vtkViewTheme_h
21#define vtkViewTheme_h
22
23#include "vtkObject.h"
24#include "vtkViewsCoreModule.h" // For export macro
25#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
26
27VTK_ABI_NAMESPACE_BEGIN
29class vtkTextProperty;
30
31class VTKVIEWSCORE_EXPORT VTK_MARSHALAUTO vtkViewTheme : public vtkObject
32{
33public:
34 static vtkViewTheme* New();
35 vtkTypeMacro(vtkViewTheme, vtkObject);
36 void PrintSelf(ostream& os, vtkIndent indent) override;
37
39
42 vtkSetMacro(PointSize, double);
43 vtkGetMacro(PointSize, double);
45
47
50 vtkSetMacro(LineWidth, double);
51 vtkGetMacro(LineWidth, double);
53
55
59 vtkSetVector3Macro(PointColor, double);
60 vtkGetVector3Macro(PointColor, double);
61 vtkSetMacro(PointOpacity, double);
62 vtkGetMacro(PointOpacity, double);
64
66
71 virtual void SetPointHueRange(double mn, double mx);
72 virtual void SetPointHueRange(double rng[2]);
73 virtual double* GetPointHueRange();
74 virtual void GetPointHueRange(double& mn, double& mx);
75 virtual void GetPointHueRange(double rng[2]);
77
78 virtual void SetPointSaturationRange(double mn, double mx);
79 virtual void SetPointSaturationRange(double rng[2]);
80 virtual double* GetPointSaturationRange();
81 virtual void GetPointSaturationRange(double& mn, double& mx);
82 virtual void GetPointSaturationRange(double rng[2]);
83
84 virtual void SetPointValueRange(double mn, double mx);
85 virtual void SetPointValueRange(double rng[2]);
86 virtual double* GetPointValueRange();
87 virtual void GetPointValueRange(double& mn, double& mx);
88 virtual void GetPointValueRange(double rng[2]);
89
90 virtual void SetPointAlphaRange(double mn, double mx);
91 virtual void SetPointAlphaRange(double rng[2]);
92 virtual double* GetPointAlphaRange();
93 virtual void GetPointAlphaRange(double& mn, double& mx);
94 virtual void GetPointAlphaRange(double rng[2]);
95
97
103
105
108 vtkSetMacro(ScalePointLookupTable, bool);
109 vtkGetMacro(ScalePointLookupTable, bool);
110 vtkBooleanMacro(ScalePointLookupTable, bool);
112
114
118 vtkSetVector3Macro(CellColor, double);
119 vtkGetVector3Macro(CellColor, double);
120 vtkSetMacro(CellOpacity, double);
121 vtkGetMacro(CellOpacity, double);
123
125
130 virtual void SetCellHueRange(double mn, double mx);
131 virtual void SetCellHueRange(double rng[2]);
132 virtual double* GetCellHueRange();
133 virtual void GetCellHueRange(double& mn, double& mx);
134 virtual void GetCellHueRange(double rng[2]);
136
137 virtual void SetCellSaturationRange(double mn, double mx);
138 virtual void SetCellSaturationRange(double rng[2]);
139 virtual double* GetCellSaturationRange();
140 virtual void GetCellSaturationRange(double& mn, double& mx);
141 virtual void GetCellSaturationRange(double rng[2]);
142
143 virtual void SetCellValueRange(double mn, double mx);
144 virtual void SetCellValueRange(double rng[2]);
145 virtual double* GetCellValueRange();
146 virtual void GetCellValueRange(double& mn, double& mx);
147 virtual void GetCellValueRange(double rng[2]);
148
149 virtual void SetCellAlphaRange(double mn, double mx);
150 virtual void SetCellAlphaRange(double rng[2]);
151 virtual double* GetCellAlphaRange();
152 virtual void GetCellAlphaRange(double& mn, double& mx);
153 virtual void GetCellAlphaRange(double rng[2]);
154
156
162
164
167 vtkSetMacro(ScaleCellLookupTable, bool);
168 vtkGetMacro(ScaleCellLookupTable, bool);
169 vtkBooleanMacro(ScaleCellLookupTable, bool);
171
173
176 vtkSetVector3Macro(OutlineColor, double);
177 vtkGetVector3Macro(OutlineColor, double);
179
181
184 vtkSetVector3Macro(SelectedPointColor, double);
185 vtkGetVector3Macro(SelectedPointColor, double);
186 vtkSetMacro(SelectedPointOpacity, double);
187 vtkGetMacro(SelectedPointOpacity, double);
189
191
194 vtkSetVector3Macro(SelectedCellColor, double);
195 vtkGetVector3Macro(SelectedCellColor, double);
196 vtkSetMacro(SelectedCellOpacity, double);
197 vtkGetMacro(SelectedCellOpacity, double);
199
201
204 vtkSetVector3Macro(BackgroundColor, double);
205 vtkGetVector3Macro(BackgroundColor, double);
207
209
212 vtkSetVector3Macro(BackgroundColor2, double);
213 vtkGetVector3Macro(BackgroundColor2, double);
215
217
223
225
231
233
237 virtual void SetVertexLabelColor(double r, double g, double b);
238 virtual void SetVertexLabelColor(double c[3]) { this->SetVertexLabelColor(c[0], c[1], c[2]); }
239 virtual double* GetVertexLabelColor();
240 virtual void GetVertexLabelColor(double& r, double& g, double& b)
241 {
242 double* c = this->GetVertexLabelColor();
243 if (c)
244 {
245 r = c[0];
246 g = c[1];
247 b = c[2];
248 }
249 }
250 virtual void GetVertexLabelColor(double c[3]) { this->GetVertexLabelColor(c[0], c[1], c[2]); }
252
254
258 virtual void SetEdgeLabelColor(double r, double g, double b);
259 virtual void SetEdgeLabelColor(double c[3]) { this->SetEdgeLabelColor(c[0], c[1], c[2]); }
260 virtual double* GetEdgeLabelColor();
261 virtual void GetEdgeLabelColor(double& r, double& g, double& b)
262 {
263 double* c = this->GetEdgeLabelColor();
264 if (c)
265 {
266 r = c[0];
267 g = c[1];
268 b = c[2];
269 }
270 }
271 virtual void GetEdgeLabelColor(double c[3]) { this->GetEdgeLabelColor(c[0], c[1], c[2]); }
273
275
284
286
293
294protected:
296 ~vtkViewTheme() override;
297
298 double PointSize;
299 double LineWidth;
300
301 double PointColor[3];
303
304 double CellColor[3];
306
307 double OutlineColor[3];
308
313
316
319
322
325
326private:
327 vtkViewTheme(const vtkViewTheme&) = delete;
328 void operator=(const vtkViewTheme&) = delete;
329};
330
331VTK_ABI_NAMESPACE_END
332#endif
a simple class to control print indentation
Definition vtkIndent.h:29
Superclass for mapping scalar values to colors.
represent text properties.
bool LookupMatchesCellTheme(vtkScalarsToColors *s2c)
Whether a given lookup table matches the point or cell theme of this theme.
virtual void GetCellValueRange(double &mn, double &mx)
virtual void SetPointValueRange(double rng[2])
double PointOpacity
virtual double * GetCellSaturationRange()
~vtkViewTheme() override
virtual void GetVertexLabelColor(double &r, double &g, double &b)
The color to use for labeling graph vertices.
virtual double * GetCellHueRange()
The ranges to use in the cell lookup table.
virtual void SetCellValueRange(double mn, double mx)
vtkScalarsToColors * PointLookupTable
virtual void SetPointValueRange(double mn, double mx)
virtual void SetPointHueRange(double mn, double mx)
The ranges to use in the point lookup table.
virtual void GetPointValueRange(double rng[2])
virtual void GetEdgeLabelColor(double &r, double &g, double &b)
The color to use for labeling graph edges.
double SelectedPointOpacity
virtual void SetPointAlphaRange(double rng[2])
virtual void SetCellLookupTable(vtkScalarsToColors *lut)
Set/Get the cell lookup table.
virtual void SetPointAlphaRange(double mn, double mx)
virtual void SetCellHueRange(double mn, double mx)
The ranges to use in the cell lookup table.
double BackgroundColor[3]
virtual void GetCellAlphaRange(double &mn, double &mx)
virtual void GetEdgeLabelColor(double c[3])
The color to use for labeling graph edges.
virtual void GetPointAlphaRange(double rng[2])
double PointColor[3]
double BackgroundColor2[3]
virtual void GetPointHueRange(double &mn, double &mx)
The ranges to use in the point lookup table.
virtual double * GetPointValueRange()
virtual void SetPointSaturationRange(double rng[2])
virtual double * GetPointSaturationRange()
static vtkViewTheme * CreateNeonTheme()
Convenience methods for creating some default view themes.
virtual void SetCellAlphaRange(double rng[2])
virtual void SetVertexLabelColor(double c[3])
The color to use for labeling graph vertices.
bool ScalePointLookupTable
virtual double * GetEdgeLabelColor()
The color to use for labeling graph edges.
virtual void GetPointSaturationRange(double rng[2])
virtual void SetCellSaturationRange(double mn, double mx)
virtual void GetCellValueRange(double rng[2])
virtual void SetCellValueRange(double rng[2])
double OutlineColor[3]
virtual void GetCellSaturationRange(double rng[2])
virtual double * GetVertexLabelColor()
The color to use for labeling graph vertices.
virtual void GetVertexLabelColor(double c[3])
The color to use for labeling graph vertices.
static vtkViewTheme * CreateOceanTheme()
Convenience methods for creating some default view themes.
vtkTextProperty * CellTextProperty
virtual void GetCellHueRange(double rng[2])
The ranges to use in the cell lookup table.
virtual void SetPointSaturationRange(double mn, double mx)
vtkTextProperty * PointTextProperty
virtual void SetCellAlphaRange(double mn, double mx)
virtual void GetPointSaturationRange(double &mn, double &mx)
virtual void GetPointValueRange(double &mn, double &mx)
virtual double * GetPointHueRange()
The ranges to use in the point lookup table.
virtual double * GetCellValueRange()
virtual void SetEdgeLabelColor(double c[3])
The color to use for labeling graph edges.
virtual double * GetPointAlphaRange()
virtual void GetCellSaturationRange(double &mn, double &mx)
virtual void GetPointHueRange(double rng[2])
The ranges to use in the point lookup table.
virtual void SetEdgeLabelColor(double r, double g, double b)
The color to use for labeling graph edges.
bool LookupMatchesPointTheme(vtkScalarsToColors *s2c)
Whether a given lookup table matches the point or cell theme of this theme.
virtual void SetPointLookupTable(vtkScalarsToColors *lut)
Set/Get the point lookup table.
virtual void SetPointTextProperty(vtkTextProperty *tprop)
The text property to use for labeling points/vertices.
virtual void GetCellAlphaRange(double rng[2])
double CellColor[3]
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void SetPointHueRange(double rng[2])
The ranges to use in the point lookup table.
virtual void SetCellSaturationRange(double rng[2])
virtual void GetPointAlphaRange(double &mn, double &mx)
bool ScaleCellLookupTable
vtkScalarsToColors * CellLookupTable
virtual double * GetCellAlphaRange()
double SelectedCellOpacity
static vtkViewTheme * CreateMellowTheme()
Convenience methods for creating some default view themes.
virtual void GetCellHueRange(double &mn, double &mx)
The ranges to use in the cell lookup table.
virtual void SetCellTextProperty(vtkTextProperty *tprop)
The text property to use for labeling edges/cells.
virtual void SetVertexLabelColor(double r, double g, double b)
The color to use for labeling graph vertices.
double CellOpacity
virtual void SetCellHueRange(double rng[2])
The ranges to use in the cell lookup table.
double SelectedPointColor[3]
double SelectedCellColor[3]
static vtkViewTheme * New()
#define VTK_MARSHALAUTO