VTK: Views/Core/vtkViewTheme.h Source File

| VTK 9.3.1

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
32 #ifndef vtkViewTheme_h
33 #define vtkViewTheme_h
34
35 #include "vtkObject.h"
36 #include "vtkViewsCoreModule.h" // For export macro
37
38 VTK_ABI_NAMESPACE_BEGIN
39 class vtkScalarsToColors;
40 class vtkTextProperty;
41
42 class VTKVIEWSCORE_EXPORT vtkViewTheme : public vtkObject
43 {
44 public:
45 static vtkViewTheme* New();
46 vtkTypeMacro(vtkViewTheme, vtkObject);
47 void PrintSelf(ostream& os, vtkIndent indent) override;
48
50
53 vtkSetMacro(PointSize, double);
54 vtkGetMacro(PointSize, double);
56
58
61 vtkSetMacro(LineWidth, double);
62 vtkGetMacro(LineWidth, double);
64
66
70 vtkSetVector3Macro(PointColor, double);
71 vtkGetVector3Macro(PointColor, double);
72 vtkSetMacro(PointOpacity, double);
73 vtkGetMacro(PointOpacity, double);
75
77
82 virtual void SetPointHueRange(double mn, double mx);
83 virtual void SetPointHueRange(double rng[2]);
84 virtual double* GetPointHueRange();
85 virtual void GetPointHueRange(double& mn, double& mx);
86 virtual void GetPointHueRange(double rng[2]);
88
89 virtual void SetPointSaturationRange(double mn, double mx);
90 virtual void SetPointSaturationRange(double rng[2]);
91 virtual double* GetPointSaturationRange();
92 virtual void GetPointSaturationRange(double& mn, double& mx);
93 virtual void GetPointSaturationRange(double rng[2]);
94
95 virtual void SetPointValueRange(double mn, double mx);
96 virtual void SetPointValueRange(double rng[2]);
97 virtual double* GetPointValueRange();
98 virtual void GetPointValueRange(double& mn, double& mx);
99 virtual void GetPointValueRange(double rng[2]);
100
101 virtual void SetPointAlphaRange(double mn, double mx);
102 virtual void SetPointAlphaRange(double rng[2]);
103 virtual double* GetPointAlphaRange();
104 virtual void GetPointAlphaRange(double& mn, double& mx);
105 virtual void GetPointAlphaRange(double rng[2]);
106
108
111 vtkGetObjectMacro(PointLookupTable, vtkScalarsToColors);
112 virtual void SetPointLookupTable(vtkScalarsToColors* lut);
114
116
119 vtkSetMacro(ScalePointLookupTable, bool);
120 vtkGetMacro(ScalePointLookupTable, bool);
121 vtkBooleanMacro(ScalePointLookupTable, bool);
123
125
129 vtkSetVector3Macro(CellColor, double);
130 vtkGetVector3Macro(CellColor, double);
131 vtkSetMacro(CellOpacity, double);
132 vtkGetMacro(CellOpacity, double);
134
136
141 virtual void SetCellHueRange(double mn, double mx);
142 virtual void SetCellHueRange(double rng[2]);
143 virtual double* GetCellHueRange();
144 virtual void GetCellHueRange(double& mn, double& mx);
145 virtual void GetCellHueRange(double rng[2]);
147
148 virtual void SetCellSaturationRange(double mn, double mx);
149 virtual void SetCellSaturationRange(double rng[2]);
150 virtual double* GetCellSaturationRange();
151 virtual void GetCellSaturationRange(double& mn, double& mx);
152 virtual void GetCellSaturationRange(double rng[2]);
153
154 virtual void SetCellValueRange(double mn, double mx);
155 virtual void SetCellValueRange(double rng[2]);
156 virtual double* GetCellValueRange();
157 virtual void GetCellValueRange(double& mn, double& mx);
158 virtual void GetCellValueRange(double rng[2]);
159
160 virtual void SetCellAlphaRange(double mn, double mx);
161 virtual void SetCellAlphaRange(double rng[2]);
162 virtual double* GetCellAlphaRange();
163 virtual void GetCellAlphaRange(double& mn, double& mx);
164 virtual void GetCellAlphaRange(double rng[2]);
165
167
170 vtkGetObjectMacro(CellLookupTable, vtkScalarsToColors);
171 virtual void SetCellLookupTable(vtkScalarsToColors* lut);
173
175
178 vtkSetMacro(ScaleCellLookupTable, bool);
179 vtkGetMacro(ScaleCellLookupTable, bool);
180 vtkBooleanMacro(ScaleCellLookupTable, bool);
182
184
187 vtkSetVector3Macro(OutlineColor, double);
188 vtkGetVector3Macro(OutlineColor, double);
190
192
195 vtkSetVector3Macro(SelectedPointColor, double);
196 vtkGetVector3Macro(SelectedPointColor, double);
197 vtkSetMacro(SelectedPointOpacity, double);
198 vtkGetMacro(SelectedPointOpacity, double);
200
202
205 vtkSetVector3Macro(SelectedCellColor, double);
206 vtkGetVector3Macro(SelectedCellColor, double);
207 vtkSetMacro(SelectedCellOpacity, double);
208 vtkGetMacro(SelectedCellOpacity, double);
210
212
215 vtkSetVector3Macro(BackgroundColor, double);
216 vtkGetVector3Macro(BackgroundColor, double);
218
220
223 vtkSetVector3Macro(BackgroundColor2, double);
224 vtkGetVector3Macro(BackgroundColor2, double);
226
228
231 virtual void SetPointTextProperty(vtkTextProperty* tprop);
232 vtkGetObjectMacro(PointTextProperty, vtkTextProperty);
234
236
239 virtual void SetCellTextProperty(vtkTextProperty* tprop);
240 vtkGetObjectMacro(CellTextProperty, vtkTextProperty);
242
244
248 virtual void SetVertexLabelColor(double r, double g, double b);
249 virtual void SetVertexLabelColor(double c[3]) { this->SetVertexLabelColor(c[0], c[1], c[2]); }
250 virtual double* GetVertexLabelColor();
251 virtual void GetVertexLabelColor(double& r, double& g, double& b)
252 {
253 double* c = this->GetVertexLabelColor();
254 if (c)
255 {
256 r = c[0];
257 g = c[1];
258 b = c[2];
259 }
260 }
261 virtual void GetVertexLabelColor(double c[3]) { this->GetVertexLabelColor(c[0], c[1], c[2]); }
263
265
269 virtual void SetEdgeLabelColor(double r, double g, double b);
270 virtual void SetEdgeLabelColor(double c[3]) { this->SetEdgeLabelColor(c[0], c[1], c[2]); }
271 virtual double* GetEdgeLabelColor();
272 virtual void GetEdgeLabelColor(double& r, double& g, double& b)
273 {
274 double* c = this->GetEdgeLabelColor();
275 if (c)
276 {
277 r = c[0];
278 g = c[1];
279 b = c[2];
280 }
281 }
282 virtual void GetEdgeLabelColor(double c[3]) { this->GetEdgeLabelColor(c[0], c[1], c[2]); }
284
286
291 static vtkViewTheme* CreateOceanTheme();
292 static vtkViewTheme* CreateMellowTheme();
293 static vtkViewTheme* CreateNeonTheme();
295
297
301 bool LookupMatchesPointTheme(vtkScalarsToColors* s2c);
302 bool LookupMatchesCellTheme(vtkScalarsToColors* s2c);
304
305 protected:
306 vtkViewTheme();
307 ~vtkViewTheme() override;
308
309 double PointSize;
310 double LineWidth;
311
312 double PointColor[3];
313 double PointOpacity;
314
315 double CellColor[3];
316 double CellOpacity;
317
318 double OutlineColor[3];
319
320 double SelectedPointColor[3];
321 double SelectedPointOpacity;
322 double SelectedCellColor[3];
323 double SelectedCellOpacity;
324
325 double BackgroundColor[3];
326 double BackgroundColor2[3];
327
328 vtkScalarsToColors* PointLookupTable;
329 vtkScalarsToColors* CellLookupTable;
330
331 bool ScalePointLookupTable;
332 bool ScaleCellLookupTable;
333
334 vtkTextProperty* PointTextProperty;
335 vtkTextProperty* CellTextProperty;
336
337 private:
338 vtkViewTheme(const vtkViewTheme&) = delete;
339 void operator=(const vtkViewTheme&) = delete;
340 };
341
342 VTK_ABI_NAMESPACE_END
343 #endif
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:61
vtkScalarsToColors
Superclass for mapping scalar values to colors.
Definition: vtkScalarsToColors.h:65
vtkTextProperty
represent text properties.
Definition: vtkTextProperty.h:35
vtkViewTheme
Sets theme colors for a graphical view.
Definition: vtkViewTheme.h:43
vtkViewTheme::LookupMatchesCellTheme
bool LookupMatchesCellTheme(vtkScalarsToColors *s2c)
Whether a given lookup table matches the point or cell theme of this theme.
vtkViewTheme::GetCellValueRange
virtual void GetCellValueRange(double &mn, double &mx)
vtkViewTheme::SetPointValueRange
virtual void SetPointValueRange(double rng[2])
vtkViewTheme::PointOpacity
double PointOpacity
Definition: vtkViewTheme.h:313
vtkViewTheme::~vtkViewTheme
~vtkViewTheme() override
vtkViewTheme::New
static vtkViewTheme * New()
vtkViewTheme::GetVertexLabelColor
virtual void GetVertexLabelColor(double &r, double &g, double &b)
The color to use for labeling graph vertices.
Definition: vtkViewTheme.h:251
vtkViewTheme::SetCellValueRange
virtual void SetCellValueRange(double mn, double mx)
vtkViewTheme::PointLookupTable
vtkScalarsToColors * PointLookupTable
Definition: vtkViewTheme.h:328
vtkViewTheme::SetPointValueRange
virtual void SetPointValueRange(double mn, double mx)
vtkViewTheme::SetPointHueRange
virtual void SetPointHueRange(double mn, double mx)
The ranges to use in the point lookup table.
vtkViewTheme::GetPointValueRange
virtual void GetPointValueRange(double rng[2])
vtkViewTheme::GetPointAlphaRange
virtual double * GetPointAlphaRange()
vtkViewTheme::GetEdgeLabelColor
virtual void GetEdgeLabelColor(double &r, double &g, double &b)
The color to use for labeling graph edges.
Definition: vtkViewTheme.h:272
vtkViewTheme::GetVertexLabelColor
virtual double * GetVertexLabelColor()
The color to use for labeling graph vertices.
vtkViewTheme::SelectedPointOpacity
double SelectedPointOpacity
Definition: vtkViewTheme.h:321
vtkViewTheme::PointSize
double PointSize
Definition: vtkViewTheme.h:309
vtkViewTheme::SetPointAlphaRange
virtual void SetPointAlphaRange(double rng[2])
vtkViewTheme::CreateMellowTheme
static vtkViewTheme * CreateMellowTheme()
Convenience methods for creating some default view themes.
vtkViewTheme::SetCellLookupTable
virtual void SetCellLookupTable(vtkScalarsToColors *lut)
Set/Get the cell lookup table.
vtkViewTheme::SetPointAlphaRange
virtual void SetPointAlphaRange(double mn, double mx)
vtkViewTheme::GetEdgeLabelColor
virtual double * GetEdgeLabelColor()
The color to use for labeling graph edges.
vtkViewTheme::SetCellHueRange
virtual void SetCellHueRange(double mn, double mx)
The ranges to use in the cell lookup table.
vtkViewTheme::GetCellAlphaRange
virtual void GetCellAlphaRange(double &mn, double &mx)
vtkViewTheme::GetEdgeLabelColor
virtual void GetEdgeLabelColor(double c[3])
The color to use for labeling graph edges.
Definition: vtkViewTheme.h:282
vtkViewTheme::GetPointAlphaRange
virtual void GetPointAlphaRange(double rng[2])
vtkViewTheme::GetPointHueRange
virtual void GetPointHueRange(double &mn, double &mx)
The ranges to use in the point lookup table.
vtkViewTheme::SetPointSaturationRange
virtual void SetPointSaturationRange(double rng[2])
vtkViewTheme::SetCellAlphaRange
virtual void SetCellAlphaRange(double rng[2])
vtkViewTheme::SetVertexLabelColor
virtual void SetVertexLabelColor(double c[3])
The color to use for labeling graph vertices.
Definition: vtkViewTheme.h:249
vtkViewTheme::GetCellValueRange
virtual double * GetCellValueRange()
vtkViewTheme::ScalePointLookupTable
bool ScalePointLookupTable
Definition: vtkViewTheme.h:331
vtkViewTheme::GetPointHueRange
virtual double * GetPointHueRange()
The ranges to use in the point lookup table.
vtkViewTheme::GetPointSaturationRange
virtual void GetPointSaturationRange(double rng[2])
vtkViewTheme::SetCellSaturationRange
virtual void SetCellSaturationRange(double mn, double mx)
vtkViewTheme::GetCellValueRange
virtual void GetCellValueRange(double rng[2])
vtkViewTheme::SetCellValueRange
virtual void SetCellValueRange(double rng[2])
vtkViewTheme::GetPointValueRange
virtual double * GetPointValueRange()
vtkViewTheme::CreateNeonTheme
static vtkViewTheme * CreateNeonTheme()
Convenience methods for creating some default view themes.
vtkViewTheme::LineWidth
double LineWidth
Definition: vtkViewTheme.h:310
vtkViewTheme::GetCellAlphaRange
virtual double * GetCellAlphaRange()
vtkViewTheme::GetCellSaturationRange
virtual void GetCellSaturationRange(double rng[2])
vtkViewTheme::GetCellSaturationRange
virtual double * GetCellSaturationRange()
vtkViewTheme::GetVertexLabelColor
virtual void GetVertexLabelColor(double c[3])
The color to use for labeling graph vertices.
Definition: vtkViewTheme.h:261
vtkViewTheme::CellTextProperty
vtkTextProperty * CellTextProperty
Definition: vtkViewTheme.h:335
vtkViewTheme::GetCellHueRange
virtual void GetCellHueRange(double rng[2])
The ranges to use in the cell lookup table.
vtkViewTheme::SetPointSaturationRange
virtual void SetPointSaturationRange(double mn, double mx)
vtkViewTheme::CreateOceanTheme
static vtkViewTheme * CreateOceanTheme()
Convenience methods for creating some default view themes.
vtkViewTheme::PointTextProperty
vtkTextProperty * PointTextProperty
Definition: vtkViewTheme.h:334
vtkViewTheme::SetCellAlphaRange
virtual void SetCellAlphaRange(double mn, double mx)
vtkViewTheme::GetPointSaturationRange
virtual void GetPointSaturationRange(double &mn, double &mx)
vtkViewTheme::GetPointValueRange
virtual void GetPointValueRange(double &mn, double &mx)
vtkViewTheme::SetEdgeLabelColor
virtual void SetEdgeLabelColor(double c[3])
The color to use for labeling graph edges.
Definition: vtkViewTheme.h:270
vtkViewTheme::vtkViewTheme
vtkViewTheme()
vtkViewTheme::GetCellSaturationRange
virtual void GetCellSaturationRange(double &mn, double &mx)
vtkViewTheme::GetPointHueRange
virtual void GetPointHueRange(double rng[2])
The ranges to use in the point lookup table.
vtkViewTheme::SetEdgeLabelColor
virtual void SetEdgeLabelColor(double r, double g, double b)
The color to use for labeling graph edges.
vtkViewTheme::LookupMatchesPointTheme
bool LookupMatchesPointTheme(vtkScalarsToColors *s2c)
Whether a given lookup table matches the point or cell theme of this theme.
vtkViewTheme::SetPointLookupTable
virtual void SetPointLookupTable(vtkScalarsToColors *lut)
Set/Get the point lookup table.
vtkViewTheme::SetPointTextProperty
virtual void SetPointTextProperty(vtkTextProperty *tprop)
The text property to use for labeling points/vertices.
vtkViewTheme::GetCellAlphaRange
virtual void GetCellAlphaRange(double rng[2])
vtkViewTheme::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkViewTheme::SetPointHueRange
virtual void SetPointHueRange(double rng[2])
The ranges to use in the point lookup table.
vtkViewTheme::GetPointSaturationRange
virtual double * GetPointSaturationRange()
vtkViewTheme::SetCellSaturationRange
virtual void SetCellSaturationRange(double rng[2])
vtkViewTheme::GetPointAlphaRange
virtual void GetPointAlphaRange(double &mn, double &mx)
vtkViewTheme::ScaleCellLookupTable
bool ScaleCellLookupTable
Definition: vtkViewTheme.h:332
vtkViewTheme::CellLookupTable
vtkScalarsToColors * CellLookupTable
Definition: vtkViewTheme.h:329
vtkViewTheme::SelectedCellOpacity
double SelectedCellOpacity
Definition: vtkViewTheme.h:323
vtkViewTheme::GetCellHueRange
virtual void GetCellHueRange(double &mn, double &mx)
The ranges to use in the cell lookup table.
vtkViewTheme::SetCellTextProperty
virtual void SetCellTextProperty(vtkTextProperty *tprop)
The text property to use for labeling edges/cells.
vtkViewTheme::SetVertexLabelColor
virtual void SetVertexLabelColor(double r, double g, double b)
The color to use for labeling graph vertices.
vtkViewTheme::CellOpacity
double CellOpacity
Definition: vtkViewTheme.h:316
vtkViewTheme::SetCellHueRange
virtual void SetCellHueRange(double rng[2])
The ranges to use in the cell lookup table.
vtkViewTheme::GetCellHueRange
virtual double * GetCellHueRange()
The ranges to use in the cell lookup table.
vtkObject.h