VTK  9.1.0
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-------------------------------------------------------------------------*/
42#ifndef vtkViewTheme_h
43#define vtkViewTheme_h
44
45#include "vtkObject.h"
46#include "vtkViewsCoreModule.h" // For export macro
47
49class vtkTextProperty;
50
51class VTKVIEWSCORE_EXPORT vtkViewTheme : public vtkObject
52{
53public:
54 static vtkViewTheme* New();
55 vtkTypeMacro(vtkViewTheme, vtkObject);
56 void PrintSelf(ostream& os, vtkIndent indent) override;
57
59
62 vtkSetMacro(PointSize, double);
63 vtkGetMacro(PointSize, double);
65
67
70 vtkSetMacro(LineWidth, double);
71 vtkGetMacro(LineWidth, double);
73
75
79 vtkSetVector3Macro(PointColor, double);
80 vtkGetVector3Macro(PointColor, double);
81 vtkSetMacro(PointOpacity, double);
82 vtkGetMacro(PointOpacity, double);
84
86
91 virtual void SetPointHueRange(double mn, double mx);
92 virtual void SetPointHueRange(double rng[2]);
93 virtual double* GetPointHueRange();
94 virtual void GetPointHueRange(double& mn, double& mx);
95 virtual void GetPointHueRange(double rng[2]);
97
98 virtual void SetPointSaturationRange(double mn, double mx);
99 virtual void SetPointSaturationRange(double rng[2]);
100 virtual double* GetPointSaturationRange();
101 virtual void GetPointSaturationRange(double& mn, double& mx);
102 virtual void GetPointSaturationRange(double rng[2]);
103
104 virtual void SetPointValueRange(double mn, double mx);
105 virtual void SetPointValueRange(double rng[2]);
106 virtual double* GetPointValueRange();
107 virtual void GetPointValueRange(double& mn, double& mx);
108 virtual void GetPointValueRange(double rng[2]);
109
110 virtual void SetPointAlphaRange(double mn, double mx);
111 virtual void SetPointAlphaRange(double rng[2]);
112 virtual double* GetPointAlphaRange();
113 virtual void GetPointAlphaRange(double& mn, double& mx);
114 virtual void GetPointAlphaRange(double rng[2]);
115
117
120 vtkGetObjectMacro(PointLookupTable, vtkScalarsToColors);
123
125
128 vtkSetMacro(ScalePointLookupTable, bool);
129 vtkGetMacro(ScalePointLookupTable, bool);
130 vtkBooleanMacro(ScalePointLookupTable, bool);
132
134
138 vtkSetVector3Macro(CellColor, double);
139 vtkGetVector3Macro(CellColor, double);
140 vtkSetMacro(CellOpacity, double);
141 vtkGetMacro(CellOpacity, double);
143
145
150 virtual void SetCellHueRange(double mn, double mx);
151 virtual void SetCellHueRange(double rng[2]);
152 virtual double* GetCellHueRange();
153 virtual void GetCellHueRange(double& mn, double& mx);
154 virtual void GetCellHueRange(double rng[2]);
156
157 virtual void SetCellSaturationRange(double mn, double mx);
158 virtual void SetCellSaturationRange(double rng[2]);
159 virtual double* GetCellSaturationRange();
160 virtual void GetCellSaturationRange(double& mn, double& mx);
161 virtual void GetCellSaturationRange(double rng[2]);
162
163 virtual void SetCellValueRange(double mn, double mx);
164 virtual void SetCellValueRange(double rng[2]);
165 virtual double* GetCellValueRange();
166 virtual void GetCellValueRange(double& mn, double& mx);
167 virtual void GetCellValueRange(double rng[2]);
168
169 virtual void SetCellAlphaRange(double mn, double mx);
170 virtual void SetCellAlphaRange(double rng[2]);
171 virtual double* GetCellAlphaRange();
172 virtual void GetCellAlphaRange(double& mn, double& mx);
173 virtual void GetCellAlphaRange(double rng[2]);
174
176
179 vtkGetObjectMacro(CellLookupTable, vtkScalarsToColors);
182
184
187 vtkSetMacro(ScaleCellLookupTable, bool);
188 vtkGetMacro(ScaleCellLookupTable, bool);
189 vtkBooleanMacro(ScaleCellLookupTable, bool);
191
193
196 vtkSetVector3Macro(OutlineColor, double);
197 vtkGetVector3Macro(OutlineColor, double);
199
201
204 vtkSetVector3Macro(SelectedPointColor, double);
205 vtkGetVector3Macro(SelectedPointColor, double);
206 vtkSetMacro(SelectedPointOpacity, double);
207 vtkGetMacro(SelectedPointOpacity, double);
209
211
214 vtkSetVector3Macro(SelectedCellColor, double);
215 vtkGetVector3Macro(SelectedCellColor, double);
216 vtkSetMacro(SelectedCellOpacity, double);
217 vtkGetMacro(SelectedCellOpacity, double);
219
221
224 vtkSetVector3Macro(BackgroundColor, double);
225 vtkGetVector3Macro(BackgroundColor, double);
227
229
232 vtkSetVector3Macro(BackgroundColor2, double);
233 vtkGetVector3Macro(BackgroundColor2, double);
235
237
241 vtkGetObjectMacro(PointTextProperty, vtkTextProperty);
243
245
249 vtkGetObjectMacro(CellTextProperty, vtkTextProperty);
251
253
257 virtual void SetVertexLabelColor(double r, double g, double b);
258 virtual void SetVertexLabelColor(double c[3]) { this->SetVertexLabelColor(c[0], c[1], c[2]); }
259 virtual double* GetVertexLabelColor();
260 virtual void GetVertexLabelColor(double& r, double& g, double& b)
261 {
262 double* c = this->GetVertexLabelColor();
263 if (c)
264 {
265 r = c[0];
266 g = c[1];
267 b = c[2];
268 }
269 }
270 virtual void GetVertexLabelColor(double c[3]) { this->GetVertexLabelColor(c[0], c[1], c[2]); }
272
274
278 virtual void SetEdgeLabelColor(double r, double g, double b);
279 virtual void SetEdgeLabelColor(double c[3]) { this->SetEdgeLabelColor(c[0], c[1], c[2]); }
280 virtual double* GetEdgeLabelColor();
281 virtual void GetEdgeLabelColor(double& r, double& g, double& b)
282 {
283 double* c = this->GetEdgeLabelColor();
284 if (c)
285 {
286 r = c[0];
287 g = c[1];
288 b = c[2];
289 }
290 }
291 virtual void GetEdgeLabelColor(double c[3]) { this->GetEdgeLabelColor(c[0], c[1], c[2]); }
293
295
304
306
313
314protected:
316 ~vtkViewTheme() override;
317
318 double PointSize;
319 double LineWidth;
320
321 double PointColor[3];
323
324 double CellColor[3];
326
327 double OutlineColor[3];
328
329 double SelectedPointColor[3];
331 double SelectedCellColor[3];
333
334 double BackgroundColor[3];
335 double BackgroundColor2[3];
336
339
342
345
346private:
347 vtkViewTheme(const vtkViewTheme&) = delete;
348 void operator=(const vtkViewTheme&) = delete;
349};
350
351#endif
a simple class to control print indentation
Definition: vtkIndent.h:43
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:52
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:322
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:260
virtual double * GetCellHueRange()
The ranges to use in the cell lookup table.
virtual void SetCellValueRange(double mn, double mx)
vtkScalarsToColors * PointLookupTable
Definition: vtkViewTheme.h:337
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:281
double SelectedPointOpacity
Definition: vtkViewTheme.h:330
double PointSize
Definition: vtkViewTheme.h:318
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:291
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:258
bool ScalePointLookupTable
Definition: vtkViewTheme.h:340
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:319
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:270
static vtkViewTheme * CreateOceanTheme()
Convenience methods for creating some default view themes.
vtkTextProperty * CellTextProperty
Definition: vtkViewTheme.h:344
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:343
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:279
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:341
vtkScalarsToColors * CellLookupTable
Definition: vtkViewTheme.h:338
virtual double * GetCellAlphaRange()
double SelectedCellOpacity
Definition: vtkViewTheme.h:332
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:325
virtual void SetCellHueRange(double rng[2])
The ranges to use in the cell lookup table.
static vtkViewTheme * New()