VTK  9.2.6
vtkViewTheme.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkViewTheme.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
15/*-------------------------------------------------------------------------
16 Copyright 2008 Sandia Corporation.
17 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18 the U.S. Government retains certain rights in this software.
19-------------------------------------------------------------------------*/
48#ifndef vtkViewTheme_h
49#define vtkViewTheme_h
50
51#include "vtkObject.h"
52#include "vtkViewsCoreModule.h" // For export macro
53
55class vtkTextProperty;
56
57class VTKVIEWSCORE_EXPORT vtkViewTheme : public vtkObject
58{
59public:
60 static vtkViewTheme* New();
61 vtkTypeMacro(vtkViewTheme, vtkObject);
62 void PrintSelf(ostream& os, vtkIndent indent) override;
63
65
68 vtkSetMacro(PointSize, double);
69 vtkGetMacro(PointSize, double);
71
73
76 vtkSetMacro(LineWidth, double);
77 vtkGetMacro(LineWidth, double);
79
81
85 vtkSetVector3Macro(PointColor, double);
86 vtkGetVector3Macro(PointColor, double);
87 vtkSetMacro(PointOpacity, double);
88 vtkGetMacro(PointOpacity, double);
90
92
97 virtual void SetPointHueRange(double mn, double mx);
98 virtual void SetPointHueRange(double rng[2]);
99 virtual double* GetPointHueRange();
100 virtual void GetPointHueRange(double& mn, double& mx);
101 virtual void GetPointHueRange(double rng[2]);
103
104 virtual void SetPointSaturationRange(double mn, double mx);
105 virtual void SetPointSaturationRange(double rng[2]);
106 virtual double* GetPointSaturationRange();
107 virtual void GetPointSaturationRange(double& mn, double& mx);
108 virtual void GetPointSaturationRange(double rng[2]);
109
110 virtual void SetPointValueRange(double mn, double mx);
111 virtual void SetPointValueRange(double rng[2]);
112 virtual double* GetPointValueRange();
113 virtual void GetPointValueRange(double& mn, double& mx);
114 virtual void GetPointValueRange(double rng[2]);
115
116 virtual void SetPointAlphaRange(double mn, double mx);
117 virtual void SetPointAlphaRange(double rng[2]);
118 virtual double* GetPointAlphaRange();
119 virtual void GetPointAlphaRange(double& mn, double& mx);
120 virtual void GetPointAlphaRange(double rng[2]);
121
123
126 vtkGetObjectMacro(PointLookupTable, vtkScalarsToColors);
129
131
134 vtkSetMacro(ScalePointLookupTable, bool);
135 vtkGetMacro(ScalePointLookupTable, bool);
136 vtkBooleanMacro(ScalePointLookupTable, bool);
138
140
144 vtkSetVector3Macro(CellColor, double);
145 vtkGetVector3Macro(CellColor, double);
146 vtkSetMacro(CellOpacity, double);
147 vtkGetMacro(CellOpacity, double);
149
151
156 virtual void SetCellHueRange(double mn, double mx);
157 virtual void SetCellHueRange(double rng[2]);
158 virtual double* GetCellHueRange();
159 virtual void GetCellHueRange(double& mn, double& mx);
160 virtual void GetCellHueRange(double rng[2]);
162
163 virtual void SetCellSaturationRange(double mn, double mx);
164 virtual void SetCellSaturationRange(double rng[2]);
165 virtual double* GetCellSaturationRange();
166 virtual void GetCellSaturationRange(double& mn, double& mx);
167 virtual void GetCellSaturationRange(double rng[2]);
168
169 virtual void SetCellValueRange(double mn, double mx);
170 virtual void SetCellValueRange(double rng[2]);
171 virtual double* GetCellValueRange();
172 virtual void GetCellValueRange(double& mn, double& mx);
173 virtual void GetCellValueRange(double rng[2]);
174
175 virtual void SetCellAlphaRange(double mn, double mx);
176 virtual void SetCellAlphaRange(double rng[2]);
177 virtual double* GetCellAlphaRange();
178 virtual void GetCellAlphaRange(double& mn, double& mx);
179 virtual void GetCellAlphaRange(double rng[2]);
180
182
185 vtkGetObjectMacro(CellLookupTable, vtkScalarsToColors);
188
190
193 vtkSetMacro(ScaleCellLookupTable, bool);
194 vtkGetMacro(ScaleCellLookupTable, bool);
195 vtkBooleanMacro(ScaleCellLookupTable, bool);
197
199
202 vtkSetVector3Macro(OutlineColor, double);
203 vtkGetVector3Macro(OutlineColor, double);
205
207
210 vtkSetVector3Macro(SelectedPointColor, double);
211 vtkGetVector3Macro(SelectedPointColor, double);
212 vtkSetMacro(SelectedPointOpacity, double);
213 vtkGetMacro(SelectedPointOpacity, double);
215
217
220 vtkSetVector3Macro(SelectedCellColor, double);
221 vtkGetVector3Macro(SelectedCellColor, double);
222 vtkSetMacro(SelectedCellOpacity, double);
223 vtkGetMacro(SelectedCellOpacity, double);
225
227
230 vtkSetVector3Macro(BackgroundColor, double);
231 vtkGetVector3Macro(BackgroundColor, double);
233
235
238 vtkSetVector3Macro(BackgroundColor2, double);
239 vtkGetVector3Macro(BackgroundColor2, double);
241
243
247 vtkGetObjectMacro(PointTextProperty, vtkTextProperty);
249
251
255 vtkGetObjectMacro(CellTextProperty, vtkTextProperty);
257
259
263 virtual void SetVertexLabelColor(double r, double g, double b);
264 virtual void SetVertexLabelColor(double c[3]) { this->SetVertexLabelColor(c[0], c[1], c[2]); }
265 virtual double* GetVertexLabelColor();
266 virtual void GetVertexLabelColor(double& r, double& g, double& b)
267 {
268 double* c = this->GetVertexLabelColor();
269 if (c)
270 {
271 r = c[0];
272 g = c[1];
273 b = c[2];
274 }
275 }
276 virtual void GetVertexLabelColor(double c[3]) { this->GetVertexLabelColor(c[0], c[1], c[2]); }
278
280
284 virtual void SetEdgeLabelColor(double r, double g, double b);
285 virtual void SetEdgeLabelColor(double c[3]) { this->SetEdgeLabelColor(c[0], c[1], c[2]); }
286 virtual double* GetEdgeLabelColor();
287 virtual void GetEdgeLabelColor(double& r, double& g, double& b)
288 {
289 double* c = this->GetEdgeLabelColor();
290 if (c)
291 {
292 r = c[0];
293 g = c[1];
294 b = c[2];
295 }
296 }
297 virtual void GetEdgeLabelColor(double c[3]) { this->GetEdgeLabelColor(c[0], c[1], c[2]); }
299
301
310
312
319
320protected:
322 ~vtkViewTheme() override;
323
324 double PointSize;
325 double LineWidth;
326
327 double PointColor[3];
329
330 double CellColor[3];
332
333 double OutlineColor[3];
334
335 double SelectedPointColor[3];
337 double SelectedCellColor[3];
339
340 double BackgroundColor[3];
341 double BackgroundColor2[3];
342
345
348
351
352private:
353 vtkViewTheme(const vtkViewTheme&) = delete;
354 void operator=(const vtkViewTheme&) = delete;
355};
356
357#endif
a simple class to control print indentation
Definition vtkIndent.h:49
abstract base class for most VTK objects
Definition vtkObject.h:72
Superclass for mapping scalar values to colors.
represent text properties.
Sets theme colors for a graphical view.
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.
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])
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])
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])
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.
static vtkViewTheme * New()