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-------------------------------------------------------------------------*/
39#ifndef vtkViewTheme_h
40#define vtkViewTheme_h
41
42#include "vtkObject.h"
43#include "vtkViewsCoreModule.h" // For export macro
44
46class vtkTextProperty;
47
48class VTKVIEWSCORE_EXPORT vtkViewTheme : public vtkObject
49{
50public:
51 static vtkViewTheme* New();
52 vtkTypeMacro(vtkViewTheme, vtkObject);
53 void PrintSelf(ostream& os, vtkIndent indent) override;
54
56
59 vtkSetMacro(PointSize, double);
60 vtkGetMacro(PointSize, double);
62
64
67 vtkSetMacro(LineWidth, double);
68 vtkGetMacro(LineWidth, double);
70
72
76 vtkSetVector3Macro(PointColor, double);
77 vtkGetVector3Macro(PointColor, double);
78 vtkSetMacro(PointOpacity, double);
79 vtkGetMacro(PointOpacity, double);
81
83
88 virtual void SetPointHueRange(double mn, double mx);
89 virtual void SetPointHueRange(double rng[2]);
90 virtual double* GetPointHueRange();
91 virtual void GetPointHueRange(double& mn, double& mx);
92 virtual void GetPointHueRange(double rng[2]);
94
95 virtual void SetPointSaturationRange(double mn, double mx);
96 virtual void SetPointSaturationRange(double rng[2]);
97 virtual double* GetPointSaturationRange();
98 virtual void GetPointSaturationRange(double& mn, double& mx);
99 virtual void GetPointSaturationRange(double rng[2]);
100
101 virtual void SetPointValueRange(double mn, double mx);
102 virtual void SetPointValueRange(double rng[2]);
103 virtual double* GetPointValueRange();
104 virtual void GetPointValueRange(double& mn, double& mx);
105 virtual void GetPointValueRange(double rng[2]);
106
107 virtual void SetPointAlphaRange(double mn, double mx);
108 virtual void SetPointAlphaRange(double rng[2]);
109 virtual double* GetPointAlphaRange();
110 virtual void GetPointAlphaRange(double& mn, double& mx);
111 virtual void GetPointAlphaRange(double rng[2]);
112
114
117 vtkGetObjectMacro(PointLookupTable, vtkScalarsToColors);
120
122
125 vtkSetMacro(ScalePointLookupTable, bool);
126 vtkGetMacro(ScalePointLookupTable, bool);
127 vtkBooleanMacro(ScalePointLookupTable, bool);
129
131
135 vtkSetVector3Macro(CellColor, double);
136 vtkGetVector3Macro(CellColor, double);
137 vtkSetMacro(CellOpacity, double);
138 vtkGetMacro(CellOpacity, double);
140
142
147 virtual void SetCellHueRange(double mn, double mx);
148 virtual void SetCellHueRange(double rng[2]);
149 virtual double* GetCellHueRange();
150 virtual void GetCellHueRange(double& mn, double& mx);
151 virtual void GetCellHueRange(double rng[2]);
153
154 virtual void SetCellSaturationRange(double mn, double mx);
155 virtual void SetCellSaturationRange(double rng[2]);
156 virtual double* GetCellSaturationRange();
157 virtual void GetCellSaturationRange(double& mn, double& mx);
158 virtual void GetCellSaturationRange(double rng[2]);
159
160 virtual void SetCellValueRange(double mn, double mx);
161 virtual void SetCellValueRange(double rng[2]);
162 virtual double* GetCellValueRange();
163 virtual void GetCellValueRange(double& mn, double& mx);
164 virtual void GetCellValueRange(double rng[2]);
165
166 virtual void SetCellAlphaRange(double mn, double mx);
167 virtual void SetCellAlphaRange(double rng[2]);
168 virtual double* GetCellAlphaRange();
169 virtual void GetCellAlphaRange(double& mn, double& mx);
170 virtual void GetCellAlphaRange(double rng[2]);
171
173
176 vtkGetObjectMacro(CellLookupTable, vtkScalarsToColors);
179
181
184 vtkSetMacro(ScaleCellLookupTable, bool);
185 vtkGetMacro(ScaleCellLookupTable, bool);
186 vtkBooleanMacro(ScaleCellLookupTable, bool);
188
190
193 vtkSetVector3Macro(OutlineColor, double);
194 vtkGetVector3Macro(OutlineColor, double);
196
198
201 vtkSetVector3Macro(SelectedPointColor, double);
202 vtkGetVector3Macro(SelectedPointColor, double);
203 vtkSetMacro(SelectedPointOpacity, double);
204 vtkGetMacro(SelectedPointOpacity, double);
206
208
211 vtkSetVector3Macro(SelectedCellColor, double);
212 vtkGetVector3Macro(SelectedCellColor, double);
213 vtkSetMacro(SelectedCellOpacity, double);
214 vtkGetMacro(SelectedCellOpacity, double);
216
218
221 vtkSetVector3Macro(BackgroundColor, double);
222 vtkGetVector3Macro(BackgroundColor, double);
224
226
229 vtkSetVector3Macro(BackgroundColor2, double);
230 vtkGetVector3Macro(BackgroundColor2, double);
232
234
238 vtkGetObjectMacro(PointTextProperty, vtkTextProperty);
240
242
246 vtkGetObjectMacro(CellTextProperty, vtkTextProperty);
248
250
254 virtual void SetVertexLabelColor(double r, double g, double b);
255 virtual void SetVertexLabelColor(double c[3]) { this->SetVertexLabelColor(c[0], c[1], c[2]); }
256 virtual double* GetVertexLabelColor();
257 virtual void GetVertexLabelColor(double& r, double& g, double& b)
258 {
259 double* c = this->GetVertexLabelColor();
260 if (c)
261 {
262 r = c[0];
263 g = c[1];
264 b = c[2];
265 }
266 }
267 virtual void GetVertexLabelColor(double c[3]) { this->GetVertexLabelColor(c[0], c[1], c[2]); }
269
271
275 virtual void SetEdgeLabelColor(double r, double g, double b);
276 virtual void SetEdgeLabelColor(double c[3]) { this->SetEdgeLabelColor(c[0], c[1], c[2]); }
277 virtual double* GetEdgeLabelColor();
278 virtual void GetEdgeLabelColor(double& r, double& g, double& b)
279 {
280 double* c = this->GetEdgeLabelColor();
281 if (c)
282 {
283 r = c[0];
284 g = c[1];
285 b = c[2];
286 }
287 }
288 virtual void GetEdgeLabelColor(double c[3]) { this->GetEdgeLabelColor(c[0], c[1], c[2]); }
290
292
301
303
310
311protected:
313 ~vtkViewTheme() override;
314
315 double PointSize;
316 double LineWidth;
317
318 double PointColor[3];
320
321 double CellColor[3];
323
324 double OutlineColor[3];
325
326 double SelectedPointColor[3];
328 double SelectedCellColor[3];
330
331 double BackgroundColor[3];
332 double BackgroundColor2[3];
333
336
339
342
343private:
344 vtkViewTheme(const vtkViewTheme&) = delete;
345 void operator=(const vtkViewTheme&) = delete;
346};
347
348#endif
a simple class to control print indentation
Definition: vtkIndent.h:40
abstract base class for most VTK objects
Definition: vtkObject.h:63
Superclass for mapping scalar values to colors.
represent text properties.
Sets theme colors for a graphical view.
Definition: vtkViewTheme.h:49
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
Definition: vtkViewTheme.h:319
virtual double * GetCellSaturationRange()
~vtkViewTheme() override
virtual void GetVertexLabelColor(double &r, double &g, double &b)
The color to use for labeling graph vertices.
Definition: vtkViewTheme.h:257
virtual double * GetCellHueRange()
The ranges to use in the cell lookup table.
virtual void SetCellValueRange(double mn, double mx)
vtkScalarsToColors * PointLookupTable
Definition: vtkViewTheme.h:334
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.
Definition: vtkViewTheme.h:278
double SelectedPointOpacity
Definition: vtkViewTheme.h:327
double PointSize
Definition: vtkViewTheme.h:315
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.
Definition: vtkViewTheme.h:288
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.
Definition: vtkViewTheme.h:255
bool ScalePointLookupTable
Definition: vtkViewTheme.h:337
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 LineWidth
Definition: vtkViewTheme.h:316
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.
Definition: vtkViewTheme.h:267
static vtkViewTheme * CreateOceanTheme()
Convenience methods for creating some default view themes.
vtkTextProperty * CellTextProperty
Definition: vtkViewTheme.h:341
virtual void GetCellHueRange(double rng[2])
The ranges to use in the cell lookup table.
virtual void SetPointSaturationRange(double mn, double mx)
vtkTextProperty * PointTextProperty
Definition: vtkViewTheme.h:340
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.
Definition: vtkViewTheme.h:276
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
Definition: vtkViewTheme.h:338
vtkScalarsToColors * CellLookupTable
Definition: vtkViewTheme.h:335
virtual double * GetCellAlphaRange()
double SelectedCellOpacity
Definition: vtkViewTheme.h:329
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
Definition: vtkViewTheme.h:322
virtual void SetCellHueRange(double rng[2])
The ranges to use in the cell lookup table.
static vtkViewTheme * New()