VTK  9.7.20260716
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
108
109#ifndef vtkViewTheme_h
110#define vtkViewTheme_h
111
112#include "vtkObject.h"
113#include "vtkViewsCoreModule.h" // For export macro
114#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
115
116VTK_ABI_NAMESPACE_BEGIN
118class vtkTextProperty;
119
120class VTKVIEWSCORE_EXPORT VTK_MARSHALAUTO vtkViewTheme : public vtkObject
121{
122public:
123 static vtkViewTheme* New();
124 vtkTypeMacro(vtkViewTheme, vtkObject);
125 void PrintSelf(ostream& os, vtkIndent indent) override;
126
128
131 vtkSetMacro(PointSize, double);
132 vtkGetMacro(PointSize, double);
134
136
139 vtkSetMacro(LineWidth, double);
140 vtkGetMacro(LineWidth, double);
142
144
148 vtkSetVector3Macro(PointColor, double);
149 vtkGetVector3Macro(PointColor, double);
150 vtkSetMacro(PointOpacity, double);
151 vtkGetMacro(PointOpacity, double);
153
155
160 virtual void SetPointHueRange(double mn, double mx);
161 virtual void SetPointHueRange(double rng[2]);
162 virtual double* GetPointHueRange();
163 virtual void GetPointHueRange(double& mn, double& mx);
164 virtual void GetPointHueRange(double rng[2]);
166
167 virtual void SetPointSaturationRange(double mn, double mx);
168 virtual void SetPointSaturationRange(double rng[2]);
169 virtual double* GetPointSaturationRange();
170 virtual void GetPointSaturationRange(double& mn, double& mx);
171 virtual void GetPointSaturationRange(double rng[2]);
172
173 virtual void SetPointValueRange(double mn, double mx);
174 virtual void SetPointValueRange(double rng[2]);
175 virtual double* GetPointValueRange();
176 virtual void GetPointValueRange(double& mn, double& mx);
177 virtual void GetPointValueRange(double rng[2]);
178
179 virtual void SetPointAlphaRange(double mn, double mx);
180 virtual void SetPointAlphaRange(double rng[2]);
181 virtual double* GetPointAlphaRange();
182 virtual void GetPointAlphaRange(double& mn, double& mx);
183 virtual void GetPointAlphaRange(double rng[2]);
184
186
192
194
197 vtkSetMacro(ScalePointLookupTable, bool);
198 vtkGetMacro(ScalePointLookupTable, bool);
199 vtkBooleanMacro(ScalePointLookupTable, bool);
201
203
207 vtkSetVector3Macro(CellColor, double);
208 vtkGetVector3Macro(CellColor, double);
209 vtkSetMacro(CellOpacity, double);
210 vtkGetMacro(CellOpacity, double);
212
214
219 virtual void SetCellHueRange(double mn, double mx);
220 virtual void SetCellHueRange(double rng[2]);
221 virtual double* GetCellHueRange();
222 virtual void GetCellHueRange(double& mn, double& mx);
223 virtual void GetCellHueRange(double rng[2]);
225
226 virtual void SetCellSaturationRange(double mn, double mx);
227 virtual void SetCellSaturationRange(double rng[2]);
228 virtual double* GetCellSaturationRange();
229 virtual void GetCellSaturationRange(double& mn, double& mx);
230 virtual void GetCellSaturationRange(double rng[2]);
231
232 virtual void SetCellValueRange(double mn, double mx);
233 virtual void SetCellValueRange(double rng[2]);
234 virtual double* GetCellValueRange();
235 virtual void GetCellValueRange(double& mn, double& mx);
236 virtual void GetCellValueRange(double rng[2]);
237
238 virtual void SetCellAlphaRange(double mn, double mx);
239 virtual void SetCellAlphaRange(double rng[2]);
240 virtual double* GetCellAlphaRange();
241 virtual void GetCellAlphaRange(double& mn, double& mx);
242 virtual void GetCellAlphaRange(double rng[2]);
243
245
251
253
256 vtkSetMacro(ScaleCellLookupTable, bool);
257 vtkGetMacro(ScaleCellLookupTable, bool);
258 vtkBooleanMacro(ScaleCellLookupTable, bool);
260
262
265 vtkSetVector3Macro(OutlineColor, double);
266 vtkGetVector3Macro(OutlineColor, double);
268
270
273 vtkSetVector3Macro(SelectedPointColor, double);
274 vtkGetVector3Macro(SelectedPointColor, double);
275 vtkSetMacro(SelectedPointOpacity, double);
276 vtkGetMacro(SelectedPointOpacity, double);
278
280
283 vtkSetVector3Macro(SelectedCellColor, double);
284 vtkGetVector3Macro(SelectedCellColor, double);
285 vtkSetMacro(SelectedCellOpacity, double);
286 vtkGetMacro(SelectedCellOpacity, double);
288
290
293 vtkSetVector3Macro(BackgroundColor, double);
294 vtkGetVector3Macro(BackgroundColor, double);
296
298
301 vtkSetVector3Macro(BackgroundColor2, double);
302 vtkGetVector3Macro(BackgroundColor2, double);
304
306
312
314
320
322
326 virtual void SetVertexLabelColor(double r, double g, double b);
327 virtual void SetVertexLabelColor(double c[3]) { this->SetVertexLabelColor(c[0], c[1], c[2]); }
328 virtual double* GetVertexLabelColor();
329 virtual void GetVertexLabelColor(double& r, double& g, double& b)
330 {
331 double* c = this->GetVertexLabelColor();
332 if (c)
333 {
334 r = c[0];
335 g = c[1];
336 b = c[2];
337 }
338 }
339 virtual void GetVertexLabelColor(double c[3]) { this->GetVertexLabelColor(c[0], c[1], c[2]); }
341
343
347 virtual void SetEdgeLabelColor(double r, double g, double b);
348 virtual void SetEdgeLabelColor(double c[3]) { this->SetEdgeLabelColor(c[0], c[1], c[2]); }
349 virtual double* GetEdgeLabelColor();
350 virtual void GetEdgeLabelColor(double& r, double& g, double& b)
351 {
352 double* c = this->GetEdgeLabelColor();
353 if (c)
354 {
355 r = c[0];
356 g = c[1];
357 b = c[2];
358 }
359 }
360 virtual void GetEdgeLabelColor(double c[3]) { this->GetEdgeLabelColor(c[0], c[1], c[2]); }
362
364
373
375
382
383protected:
385 ~vtkViewTheme() override;
386
387 double PointSize;
388 double LineWidth;
389
390 double PointColor[3];
392
393 double CellColor[3];
395
396 double OutlineColor[3];
397
402
405
408
411
414
415private:
416 vtkViewTheme(const vtkViewTheme&) = delete;
417 void operator=(const vtkViewTheme&) = delete;
418};
419
420VTK_ABI_NAMESPACE_END
421#endif
a simple class to control print indentation
Definition vtkIndent.h:108
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