VTK  9.3.0
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
23 #ifndef vtkViewTheme_h
24 #define vtkViewTheme_h
25 
26 #include "vtkObject.h"
27 #include "vtkViewsCoreModule.h" // For export macro
28 
29 VTK_ABI_NAMESPACE_BEGIN
30 class vtkScalarsToColors;
31 class vtkTextProperty;
32 
33 class VTKVIEWSCORE_EXPORT vtkViewTheme : public vtkObject
34 {
35 public:
36  static vtkViewTheme* New();
37  vtkTypeMacro(vtkViewTheme, vtkObject);
38  void PrintSelf(ostream& os, vtkIndent indent) override;
39 
41 
44  vtkSetMacro(PointSize, double);
45  vtkGetMacro(PointSize, double);
47 
49 
52  vtkSetMacro(LineWidth, double);
53  vtkGetMacro(LineWidth, double);
55 
57 
61  vtkSetVector3Macro(PointColor, double);
62  vtkGetVector3Macro(PointColor, double);
63  vtkSetMacro(PointOpacity, double);
64  vtkGetMacro(PointOpacity, double);
66 
68 
73  virtual void SetPointHueRange(double mn, double mx);
74  virtual void SetPointHueRange(double rng[2]);
75  virtual double* GetPointHueRange();
76  virtual void GetPointHueRange(double& mn, double& mx);
77  virtual void GetPointHueRange(double rng[2]);
79 
80  virtual void SetPointSaturationRange(double mn, double mx);
81  virtual void SetPointSaturationRange(double rng[2]);
82  virtual double* GetPointSaturationRange();
83  virtual void GetPointSaturationRange(double& mn, double& mx);
84  virtual void GetPointSaturationRange(double rng[2]);
85 
86  virtual void SetPointValueRange(double mn, double mx);
87  virtual void SetPointValueRange(double rng[2]);
88  virtual double* GetPointValueRange();
89  virtual void GetPointValueRange(double& mn, double& mx);
90  virtual void GetPointValueRange(double rng[2]);
91 
92  virtual void SetPointAlphaRange(double mn, double mx);
93  virtual void SetPointAlphaRange(double rng[2]);
94  virtual double* GetPointAlphaRange();
95  virtual void GetPointAlphaRange(double& mn, double& mx);
96  virtual void GetPointAlphaRange(double rng[2]);
97 
99 
102  vtkGetObjectMacro(PointLookupTable, vtkScalarsToColors);
105 
107 
110  vtkSetMacro(ScalePointLookupTable, bool);
111  vtkGetMacro(ScalePointLookupTable, bool);
112  vtkBooleanMacro(ScalePointLookupTable, bool);
114 
116 
120  vtkSetVector3Macro(CellColor, double);
121  vtkGetVector3Macro(CellColor, double);
122  vtkSetMacro(CellOpacity, double);
123  vtkGetMacro(CellOpacity, double);
125 
127 
132  virtual void SetCellHueRange(double mn, double mx);
133  virtual void SetCellHueRange(double rng[2]);
134  virtual double* GetCellHueRange();
135  virtual void GetCellHueRange(double& mn, double& mx);
136  virtual void GetCellHueRange(double rng[2]);
138 
139  virtual void SetCellSaturationRange(double mn, double mx);
140  virtual void SetCellSaturationRange(double rng[2]);
141  virtual double* GetCellSaturationRange();
142  virtual void GetCellSaturationRange(double& mn, double& mx);
143  virtual void GetCellSaturationRange(double rng[2]);
144 
145  virtual void SetCellValueRange(double mn, double mx);
146  virtual void SetCellValueRange(double rng[2]);
147  virtual double* GetCellValueRange();
148  virtual void GetCellValueRange(double& mn, double& mx);
149  virtual void GetCellValueRange(double rng[2]);
150 
151  virtual void SetCellAlphaRange(double mn, double mx);
152  virtual void SetCellAlphaRange(double rng[2]);
153  virtual double* GetCellAlphaRange();
154  virtual void GetCellAlphaRange(double& mn, double& mx);
155  virtual void GetCellAlphaRange(double rng[2]);
156 
158 
161  vtkGetObjectMacro(CellLookupTable, vtkScalarsToColors);
164 
166 
169  vtkSetMacro(ScaleCellLookupTable, bool);
170  vtkGetMacro(ScaleCellLookupTable, bool);
171  vtkBooleanMacro(ScaleCellLookupTable, bool);
173 
175 
178  vtkSetVector3Macro(OutlineColor, double);
179  vtkGetVector3Macro(OutlineColor, double);
181 
183 
186  vtkSetVector3Macro(SelectedPointColor, double);
187  vtkGetVector3Macro(SelectedPointColor, double);
188  vtkSetMacro(SelectedPointOpacity, double);
189  vtkGetMacro(SelectedPointOpacity, double);
191 
193 
196  vtkSetVector3Macro(SelectedCellColor, double);
197  vtkGetVector3Macro(SelectedCellColor, double);
198  vtkSetMacro(SelectedCellOpacity, double);
199  vtkGetMacro(SelectedCellOpacity, double);
201 
203 
206  vtkSetVector3Macro(BackgroundColor, double);
207  vtkGetVector3Macro(BackgroundColor, double);
209 
211 
214  vtkSetVector3Macro(BackgroundColor2, double);
215  vtkGetVector3Macro(BackgroundColor2, double);
217 
219 
222  virtual void SetPointTextProperty(vtkTextProperty* tprop);
223  vtkGetObjectMacro(PointTextProperty, vtkTextProperty);
225 
227 
230  virtual void SetCellTextProperty(vtkTextProperty* tprop);
231  vtkGetObjectMacro(CellTextProperty, vtkTextProperty);
233 
235 
239  virtual void SetVertexLabelColor(double r, double g, double b);
240  virtual void SetVertexLabelColor(double c[3]) { this->SetVertexLabelColor(c[0], c[1], c[2]); }
241  virtual double* GetVertexLabelColor();
242  virtual void GetVertexLabelColor(double& r, double& g, double& b)
243  {
244  double* c = this->GetVertexLabelColor();
245  if (c)
246  {
247  r = c[0];
248  g = c[1];
249  b = c[2];
250  }
251  }
252  virtual void GetVertexLabelColor(double c[3]) { this->GetVertexLabelColor(c[0], c[1], c[2]); }
254 
256 
260  virtual void SetEdgeLabelColor(double r, double g, double b);
261  virtual void SetEdgeLabelColor(double c[3]) { this->SetEdgeLabelColor(c[0], c[1], c[2]); }
262  virtual double* GetEdgeLabelColor();
263  virtual void GetEdgeLabelColor(double& r, double& g, double& b)
264  {
265  double* c = this->GetEdgeLabelColor();
266  if (c)
267  {
268  r = c[0];
269  g = c[1];
270  b = c[2];
271  }
272  }
273  virtual void GetEdgeLabelColor(double c[3]) { this->GetEdgeLabelColor(c[0], c[1], c[2]); }
275 
277 
286 
288 
295 
296 protected:
298  ~vtkViewTheme() override;
299 
300  double PointSize;
301  double LineWidth;
302 
303  double PointColor[3];
304  double PointOpacity;
305 
306  double CellColor[3];
307  double CellOpacity;
308 
309  double OutlineColor[3];
310 
311  double SelectedPointColor[3];
313  double SelectedCellColor[3];
315 
316  double BackgroundColor[3];
317  double BackgroundColor2[3];
318 
321 
324 
327 
328 private:
329  vtkViewTheme(const vtkViewTheme&) = delete;
330  void operator=(const vtkViewTheme&) = delete;
331 };
332 
333 VTK_ABI_NAMESPACE_END
334 #endif
a simple class to control print indentation
Definition: vtkIndent.h:29
abstract base class for most VTK objects
Definition: vtkObject.h:52
Superclass for mapping scalar values to colors.
represent text properties.
Sets theme colors for a graphical view.
Definition: vtkViewTheme.h:34
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:304
~vtkViewTheme() override
static vtkViewTheme * New()
virtual void GetVertexLabelColor(double &r, double &g, double &b)
The color to use for labeling graph vertices.
Definition: vtkViewTheme.h:242
virtual void SetCellValueRange(double mn, double mx)
vtkScalarsToColors * PointLookupTable
Definition: vtkViewTheme.h:319
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 double * GetPointAlphaRange()
virtual void GetEdgeLabelColor(double &r, double &g, double &b)
The color to use for labeling graph edges.
Definition: vtkViewTheme.h:263
virtual double * GetVertexLabelColor()
The color to use for labeling graph vertices.
double SelectedPointOpacity
Definition: vtkViewTheme.h:312
double PointSize
Definition: vtkViewTheme.h:300
virtual void SetPointAlphaRange(double rng[2])
static vtkViewTheme * CreateMellowTheme()
Convenience methods for creating some default view themes.
virtual void SetCellLookupTable(vtkScalarsToColors *lut)
Set/Get the cell lookup table.
virtual void SetPointAlphaRange(double mn, double mx)
virtual double * GetEdgeLabelColor()
The color to use for labeling graph edges.
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:273
virtual void GetPointAlphaRange(double rng[2])
virtual void GetPointHueRange(double &mn, double &mx)
The ranges to use in the point lookup table.
virtual void SetPointSaturationRange(double rng[2])
virtual void SetCellAlphaRange(double rng[2])
virtual void SetVertexLabelColor(double c[3])
The color to use for labeling graph vertices.
Definition: vtkViewTheme.h:240
virtual double * GetCellValueRange()
bool ScalePointLookupTable
Definition: vtkViewTheme.h:322
virtual double * GetPointHueRange()
The ranges to use in the point lookup table.
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 double * GetPointValueRange()
static vtkViewTheme * CreateNeonTheme()
Convenience methods for creating some default view themes.
double LineWidth
Definition: vtkViewTheme.h:301
virtual double * GetCellAlphaRange()
virtual void GetCellSaturationRange(double rng[2])
virtual double * GetCellSaturationRange()
virtual void GetVertexLabelColor(double c[3])
The color to use for labeling graph vertices.
Definition: vtkViewTheme.h:252
vtkTextProperty * CellTextProperty
Definition: vtkViewTheme.h:326
virtual void GetCellHueRange(double rng[2])
The ranges to use in the cell lookup table.
virtual void SetPointSaturationRange(double mn, double mx)
static vtkViewTheme * CreateOceanTheme()
Convenience methods for creating some default view themes.
vtkTextProperty * PointTextProperty
Definition: vtkViewTheme.h:325
virtual void SetCellAlphaRange(double mn, double mx)
virtual void GetPointSaturationRange(double &mn, double &mx)
virtual void GetPointValueRange(double &mn, double &mx)
virtual void SetEdgeLabelColor(double c[3])
The color to use for labeling graph edges.
Definition: vtkViewTheme.h:261
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 double * GetPointSaturationRange()
virtual void SetCellSaturationRange(double rng[2])
virtual void GetPointAlphaRange(double &mn, double &mx)
bool ScaleCellLookupTable
Definition: vtkViewTheme.h:323
vtkScalarsToColors * CellLookupTable
Definition: vtkViewTheme.h:320
double SelectedCellOpacity
Definition: vtkViewTheme.h:314
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:307
virtual void SetCellHueRange(double rng[2])
The ranges to use in the cell lookup table.
virtual double * GetCellHueRange()
The ranges to use in the cell lookup table.