VTK  9.2.5
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 -------------------------------------------------------------------------*/
128 #ifndef vtkViewTheme_h
129 #define vtkViewTheme_h
130 
131 #include "vtkObject.h"
132 #include "vtkViewsCoreModule.h" // For export macro
133 
134 class vtkScalarsToColors;
135 class vtkTextProperty;
136 
137 class VTKVIEWSCORE_EXPORT vtkViewTheme : public vtkObject
138 {
139 public:
140  static vtkViewTheme* New();
141  vtkTypeMacro(vtkViewTheme, vtkObject);
142  void PrintSelf(ostream& os, vtkIndent indent) override;
143 
145 
148  vtkSetMacro(PointSize, double);
149  vtkGetMacro(PointSize, double);
151 
153 
156  vtkSetMacro(LineWidth, double);
157  vtkGetMacro(LineWidth, double);
159 
161 
165  vtkSetVector3Macro(PointColor, double);
166  vtkGetVector3Macro(PointColor, double);
167  vtkSetMacro(PointOpacity, double);
168  vtkGetMacro(PointOpacity, double);
170 
172 
177  virtual void SetPointHueRange(double mn, double mx);
178  virtual void SetPointHueRange(double rng[2]);
179  virtual double* GetPointHueRange();
180  virtual void GetPointHueRange(double& mn, double& mx);
181  virtual void GetPointHueRange(double rng[2]);
183 
184  virtual void SetPointSaturationRange(double mn, double mx);
185  virtual void SetPointSaturationRange(double rng[2]);
186  virtual double* GetPointSaturationRange();
187  virtual void GetPointSaturationRange(double& mn, double& mx);
188  virtual void GetPointSaturationRange(double rng[2]);
189 
190  virtual void SetPointValueRange(double mn, double mx);
191  virtual void SetPointValueRange(double rng[2]);
192  virtual double* GetPointValueRange();
193  virtual void GetPointValueRange(double& mn, double& mx);
194  virtual void GetPointValueRange(double rng[2]);
195 
196  virtual void SetPointAlphaRange(double mn, double mx);
197  virtual void SetPointAlphaRange(double rng[2]);
198  virtual double* GetPointAlphaRange();
199  virtual void GetPointAlphaRange(double& mn, double& mx);
200  virtual void GetPointAlphaRange(double rng[2]);
201 
203 
206  vtkGetObjectMacro(PointLookupTable, vtkScalarsToColors);
209 
211 
214  vtkSetMacro(ScalePointLookupTable, bool);
215  vtkGetMacro(ScalePointLookupTable, bool);
216  vtkBooleanMacro(ScalePointLookupTable, bool);
218 
220 
224  vtkSetVector3Macro(CellColor, double);
225  vtkGetVector3Macro(CellColor, double);
226  vtkSetMacro(CellOpacity, double);
227  vtkGetMacro(CellOpacity, double);
229 
231 
236  virtual void SetCellHueRange(double mn, double mx);
237  virtual void SetCellHueRange(double rng[2]);
238  virtual double* GetCellHueRange();
239  virtual void GetCellHueRange(double& mn, double& mx);
240  virtual void GetCellHueRange(double rng[2]);
242 
243  virtual void SetCellSaturationRange(double mn, double mx);
244  virtual void SetCellSaturationRange(double rng[2]);
245  virtual double* GetCellSaturationRange();
246  virtual void GetCellSaturationRange(double& mn, double& mx);
247  virtual void GetCellSaturationRange(double rng[2]);
248 
249  virtual void SetCellValueRange(double mn, double mx);
250  virtual void SetCellValueRange(double rng[2]);
251  virtual double* GetCellValueRange();
252  virtual void GetCellValueRange(double& mn, double& mx);
253  virtual void GetCellValueRange(double rng[2]);
254 
255  virtual void SetCellAlphaRange(double mn, double mx);
256  virtual void SetCellAlphaRange(double rng[2]);
257  virtual double* GetCellAlphaRange();
258  virtual void GetCellAlphaRange(double& mn, double& mx);
259  virtual void GetCellAlphaRange(double rng[2]);
260 
262 
265  vtkGetObjectMacro(CellLookupTable, vtkScalarsToColors);
268 
270 
273  vtkSetMacro(ScaleCellLookupTable, bool);
274  vtkGetMacro(ScaleCellLookupTable, bool);
275  vtkBooleanMacro(ScaleCellLookupTable, bool);
277 
279 
282  vtkSetVector3Macro(OutlineColor, double);
283  vtkGetVector3Macro(OutlineColor, double);
285 
287 
290  vtkSetVector3Macro(SelectedPointColor, double);
291  vtkGetVector3Macro(SelectedPointColor, double);
292  vtkSetMacro(SelectedPointOpacity, double);
293  vtkGetMacro(SelectedPointOpacity, double);
295 
297 
300  vtkSetVector3Macro(SelectedCellColor, double);
301  vtkGetVector3Macro(SelectedCellColor, double);
302  vtkSetMacro(SelectedCellOpacity, double);
303  vtkGetMacro(SelectedCellOpacity, double);
305 
307 
310  vtkSetVector3Macro(BackgroundColor, double);
311  vtkGetVector3Macro(BackgroundColor, double);
313 
315 
318  vtkSetVector3Macro(BackgroundColor2, double);
319  vtkGetVector3Macro(BackgroundColor2, double);
321 
323 
326  virtual void SetPointTextProperty(vtkTextProperty* tprop);
327  vtkGetObjectMacro(PointTextProperty, vtkTextProperty);
329 
331 
334  virtual void SetCellTextProperty(vtkTextProperty* tprop);
335  vtkGetObjectMacro(CellTextProperty, vtkTextProperty);
337 
339 
343  virtual void SetVertexLabelColor(double r, double g, double b);
344  virtual void SetVertexLabelColor(double c[3]) { this->SetVertexLabelColor(c[0], c[1], c[2]); }
345  virtual double* GetVertexLabelColor();
346  virtual void GetVertexLabelColor(double& r, double& g, double& b)
347  {
348  double* c = this->GetVertexLabelColor();
349  if (c)
350  {
351  r = c[0];
352  g = c[1];
353  b = c[2];
354  }
355  }
356  virtual void GetVertexLabelColor(double c[3]) { this->GetVertexLabelColor(c[0], c[1], c[2]); }
358 
360 
364  virtual void SetEdgeLabelColor(double r, double g, double b);
365  virtual void SetEdgeLabelColor(double c[3]) { this->SetEdgeLabelColor(c[0], c[1], c[2]); }
366  virtual double* GetEdgeLabelColor();
367  virtual void GetEdgeLabelColor(double& r, double& g, double& b)
368  {
369  double* c = this->GetEdgeLabelColor();
370  if (c)
371  {
372  r = c[0];
373  g = c[1];
374  b = c[2];
375  }
376  }
377  virtual void GetEdgeLabelColor(double c[3]) { this->GetEdgeLabelColor(c[0], c[1], c[2]); }
379 
381 
390 
392 
399 
400 protected:
402  ~vtkViewTheme() override;
403 
404  double PointSize;
405  double LineWidth;
406 
407  double PointColor[3];
408  double PointOpacity;
409 
410  double CellColor[3];
411  double CellOpacity;
412 
413  double OutlineColor[3];
414 
415  double SelectedPointColor[3];
417  double SelectedCellColor[3];
419 
420  double BackgroundColor[3];
421  double BackgroundColor2[3];
422 
425 
428 
431 
432 private:
433  vtkViewTheme(const vtkViewTheme&) = delete;
434  void operator=(const vtkViewTheme&) = delete;
435 };
436 
437 #endif
a simple class to control print indentation
Definition: vtkIndent.h:119
abstract base class for most VTK objects
Definition: vtkObject.h:82
Superclass for mapping scalar values to colors.
represent text properties.
Sets theme colors for a graphical view.
Definition: vtkViewTheme.h:138
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:408
~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:346
virtual void SetCellValueRange(double mn, double mx)
vtkScalarsToColors * PointLookupTable
Definition: vtkViewTheme.h:423
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:367
virtual double * GetVertexLabelColor()
The color to use for labeling graph vertices.
double SelectedPointOpacity
Definition: vtkViewTheme.h:416
double PointSize
Definition: vtkViewTheme.h:404
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:377
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:344
virtual double * GetCellValueRange()
bool ScalePointLookupTable
Definition: vtkViewTheme.h:426
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:405
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:356
vtkTextProperty * CellTextProperty
Definition: vtkViewTheme.h:430
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:429
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:365
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:427
vtkScalarsToColors * CellLookupTable
Definition: vtkViewTheme.h:424
double SelectedCellOpacity
Definition: vtkViewTheme.h:418
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:411
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.