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-------------------------------------------------------------------------*/
122#ifndef vtkViewTheme_h
123#define vtkViewTheme_h
124
125#include "vtkObject.h"
126#include "vtkViewsCoreModule.h" // For export macro
127
129class vtkTextProperty;
130
131class VTKVIEWSCORE_EXPORT vtkViewTheme : public vtkObject
132{
133public:
134 static vtkViewTheme* New();
135 vtkTypeMacro(vtkViewTheme, vtkObject);
136 void PrintSelf(ostream& os, vtkIndent indent) override;
137
139
142 vtkSetMacro(PointSize, double);
143 vtkGetMacro(PointSize, double);
145
147
150 vtkSetMacro(LineWidth, double);
151 vtkGetMacro(LineWidth, double);
153
155
159 vtkSetVector3Macro(PointColor, double);
160 vtkGetVector3Macro(PointColor, double);
161 vtkSetMacro(PointOpacity, double);
162 vtkGetMacro(PointOpacity, double);
164
166
171 virtual void SetPointHueRange(double mn, double mx);
172 virtual void SetPointHueRange(double rng[2]);
173 virtual double* GetPointHueRange();
174 virtual void GetPointHueRange(double& mn, double& mx);
175 virtual void GetPointHueRange(double rng[2]);
177
178 virtual void SetPointSaturationRange(double mn, double mx);
179 virtual void SetPointSaturationRange(double rng[2]);
180 virtual double* GetPointSaturationRange();
181 virtual void GetPointSaturationRange(double& mn, double& mx);
182 virtual void GetPointSaturationRange(double rng[2]);
183
184 virtual void SetPointValueRange(double mn, double mx);
185 virtual void SetPointValueRange(double rng[2]);
186 virtual double* GetPointValueRange();
187 virtual void GetPointValueRange(double& mn, double& mx);
188 virtual void GetPointValueRange(double rng[2]);
189
190 virtual void SetPointAlphaRange(double mn, double mx);
191 virtual void SetPointAlphaRange(double rng[2]);
192 virtual double* GetPointAlphaRange();
193 virtual void GetPointAlphaRange(double& mn, double& mx);
194 virtual void GetPointAlphaRange(double rng[2]);
195
197
200 vtkGetObjectMacro(PointLookupTable, vtkScalarsToColors);
203
205
208 vtkSetMacro(ScalePointLookupTable, bool);
209 vtkGetMacro(ScalePointLookupTable, bool);
210 vtkBooleanMacro(ScalePointLookupTable, bool);
212
214
218 vtkSetVector3Macro(CellColor, double);
219 vtkGetVector3Macro(CellColor, double);
220 vtkSetMacro(CellOpacity, double);
221 vtkGetMacro(CellOpacity, double);
223
225
230 virtual void SetCellHueRange(double mn, double mx);
231 virtual void SetCellHueRange(double rng[2]);
232 virtual double* GetCellHueRange();
233 virtual void GetCellHueRange(double& mn, double& mx);
234 virtual void GetCellHueRange(double rng[2]);
236
237 virtual void SetCellSaturationRange(double mn, double mx);
238 virtual void SetCellSaturationRange(double rng[2]);
239 virtual double* GetCellSaturationRange();
240 virtual void GetCellSaturationRange(double& mn, double& mx);
241 virtual void GetCellSaturationRange(double rng[2]);
242
243 virtual void SetCellValueRange(double mn, double mx);
244 virtual void SetCellValueRange(double rng[2]);
245 virtual double* GetCellValueRange();
246 virtual void GetCellValueRange(double& mn, double& mx);
247 virtual void GetCellValueRange(double rng[2]);
248
249 virtual void SetCellAlphaRange(double mn, double mx);
250 virtual void SetCellAlphaRange(double rng[2]);
251 virtual double* GetCellAlphaRange();
252 virtual void GetCellAlphaRange(double& mn, double& mx);
253 virtual void GetCellAlphaRange(double rng[2]);
254
256
259 vtkGetObjectMacro(CellLookupTable, vtkScalarsToColors);
262
264
267 vtkSetMacro(ScaleCellLookupTable, bool);
268 vtkGetMacro(ScaleCellLookupTable, bool);
269 vtkBooleanMacro(ScaleCellLookupTable, bool);
271
273
276 vtkSetVector3Macro(OutlineColor, double);
277 vtkGetVector3Macro(OutlineColor, double);
279
281
284 vtkSetVector3Macro(SelectedPointColor, double);
285 vtkGetVector3Macro(SelectedPointColor, double);
286 vtkSetMacro(SelectedPointOpacity, double);
287 vtkGetMacro(SelectedPointOpacity, double);
289
291
294 vtkSetVector3Macro(SelectedCellColor, double);
295 vtkGetVector3Macro(SelectedCellColor, double);
296 vtkSetMacro(SelectedCellOpacity, double);
297 vtkGetMacro(SelectedCellOpacity, double);
299
301
304 vtkSetVector3Macro(BackgroundColor, double);
305 vtkGetVector3Macro(BackgroundColor, double);
307
309
312 vtkSetVector3Macro(BackgroundColor2, double);
313 vtkGetVector3Macro(BackgroundColor2, double);
315
317
321 vtkGetObjectMacro(PointTextProperty, vtkTextProperty);
323
325
329 vtkGetObjectMacro(CellTextProperty, vtkTextProperty);
331
333
337 virtual void SetVertexLabelColor(double r, double g, double b);
338 virtual void SetVertexLabelColor(double c[3]) { this->SetVertexLabelColor(c[0], c[1], c[2]); }
339 virtual double* GetVertexLabelColor();
340 virtual void GetVertexLabelColor(double& r, double& g, double& b)
341 {
342 double* c = this->GetVertexLabelColor();
343 if (c)
344 {
345 r = c[0];
346 g = c[1];
347 b = c[2];
348 }
349 }
350 virtual void GetVertexLabelColor(double c[3]) { this->GetVertexLabelColor(c[0], c[1], c[2]); }
352
354
358 virtual void SetEdgeLabelColor(double r, double g, double b);
359 virtual void SetEdgeLabelColor(double c[3]) { this->SetEdgeLabelColor(c[0], c[1], c[2]); }
360 virtual double* GetEdgeLabelColor();
361 virtual void GetEdgeLabelColor(double& r, double& g, double& b)
362 {
363 double* c = this->GetEdgeLabelColor();
364 if (c)
365 {
366 r = c[0];
367 g = c[1];
368 b = c[2];
369 }
370 }
371 virtual void GetEdgeLabelColor(double c[3]) { this->GetEdgeLabelColor(c[0], c[1], c[2]); }
373
375
384
386
393
394protected:
396 ~vtkViewTheme() override;
397
398 double PointSize;
399 double LineWidth;
400
401 double PointColor[3];
403
404 double CellColor[3];
406
407 double OutlineColor[3];
408
409 double SelectedPointColor[3];
411 double SelectedCellColor[3];
413
414 double BackgroundColor[3];
415 double BackgroundColor2[3];
416
419
422
425
426private:
427 vtkViewTheme(const vtkViewTheme&) = delete;
428 void operator=(const vtkViewTheme&) = delete;
429};
430
431#endif
a simple class to control print indentation
Definition: vtkIndent.h:113
abstract base class for most VTK objects
Definition: vtkObject.h:73
Superclass for mapping scalar values to colors.
represent text properties.
Sets theme colors for a graphical view.
Definition: vtkViewTheme.h:132
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:402
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:340
virtual double * GetCellHueRange()
The ranges to use in the cell lookup table.
virtual void SetCellValueRange(double mn, double mx)
vtkScalarsToColors * PointLookupTable
Definition: vtkViewTheme.h:417
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:361
double SelectedPointOpacity
Definition: vtkViewTheme.h:410
double PointSize
Definition: vtkViewTheme.h:398
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:371
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:338
bool ScalePointLookupTable
Definition: vtkViewTheme.h:420
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:399
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:350
static vtkViewTheme * CreateOceanTheme()
Convenience methods for creating some default view themes.
vtkTextProperty * CellTextProperty
Definition: vtkViewTheme.h:424
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:423
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:359
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:421
vtkScalarsToColors * CellLookupTable
Definition: vtkViewTheme.h:418
virtual double * GetCellAlphaRange()
double SelectedCellOpacity
Definition: vtkViewTheme.h:412
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:405
virtual void SetCellHueRange(double rng[2])
The ranges to use in the cell lookup table.
static vtkViewTheme * New()