VTK
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 -------------------------------------------------------------------------*/
38 #ifndef vtkViewTheme_h
39 #define vtkViewTheme_h
40 
41 #include "vtkViewsCoreModule.h" // For export macro
42 #include "vtkObject.h"
43 
44 class vtkScalarsToColors;
45 class vtkTextProperty;
46 
48 {
49 public:
50  static vtkViewTheme* New();
51  vtkTypeMacro(vtkViewTheme, vtkObject);
52  void PrintSelf(ostream& os, vtkIndent indent);
53 
55 
56  vtkSetMacro(PointSize, double);
57  vtkGetMacro(PointSize, double);
59 
61 
62  vtkSetMacro(LineWidth, double);
63  vtkGetMacro(LineWidth, double);
65 
67 
69  vtkSetVector3Macro(PointColor, double);
70  vtkGetVector3Macro(PointColor, double);
71  vtkSetMacro(PointOpacity, double);
72  vtkGetMacro(PointOpacity, double);
74 
76 
79  virtual void SetPointHueRange(double mn, double mx);
80  virtual void SetPointHueRange(double rng[2]);
81  virtual double* GetPointHueRange();
82  virtual void GetPointHueRange(double& mn, double& mx);
83  virtual void GetPointHueRange(double rng[2]);
85 
86  virtual void SetPointSaturationRange(double mn, double mx);
87  virtual void SetPointSaturationRange(double rng[2]);
88  virtual double* GetPointSaturationRange();
89  virtual void GetPointSaturationRange(double& mn, double& mx);
90  virtual void GetPointSaturationRange(double rng[2]);
91 
92  virtual void SetPointValueRange(double mn, double mx);
93  virtual void SetPointValueRange(double rng[2]);
94  virtual double* GetPointValueRange();
95  virtual void GetPointValueRange(double& mn, double& mx);
96  virtual void GetPointValueRange(double rng[2]);
97 
98  virtual void SetPointAlphaRange(double mn, double mx);
99  virtual void SetPointAlphaRange(double rng[2]);
100  virtual double* GetPointAlphaRange();
101  virtual void GetPointAlphaRange(double& mn, double& mx);
102  virtual void GetPointAlphaRange(double rng[2]);
103 
105 
106  vtkGetObjectMacro(PointLookupTable, vtkScalarsToColors);
107  virtual void SetPointLookupTable(vtkScalarsToColors* lut);
109 
111 
112  vtkSetMacro(ScalePointLookupTable, bool);
113  vtkGetMacro(ScalePointLookupTable, bool);
114  vtkBooleanMacro(ScalePointLookupTable, bool);
116 
118 
120  vtkSetVector3Macro(CellColor, double);
121  vtkGetVector3Macro(CellColor, double);
122  vtkSetMacro(CellOpacity, double);
123  vtkGetMacro(CellOpacity, double);
125 
127 
130  virtual void SetCellHueRange(double mn, double mx);
131  virtual void SetCellHueRange(double rng[2]);
132  virtual double* GetCellHueRange();
133  virtual void GetCellHueRange(double& mn, double& mx);
134  virtual void GetCellHueRange(double rng[2]);
136 
137  virtual void SetCellSaturationRange(double mn, double mx);
138  virtual void SetCellSaturationRange(double rng[2]);
139  virtual double* GetCellSaturationRange();
140  virtual void GetCellSaturationRange(double& mn, double& mx);
141  virtual void GetCellSaturationRange(double rng[2]);
142 
143  virtual void SetCellValueRange(double mn, double mx);
144  virtual void SetCellValueRange(double rng[2]);
145  virtual double* GetCellValueRange();
146  virtual void GetCellValueRange(double& mn, double& mx);
147  virtual void GetCellValueRange(double rng[2]);
148 
149  virtual void SetCellAlphaRange(double mn, double mx);
150  virtual void SetCellAlphaRange(double rng[2]);
151  virtual double* GetCellAlphaRange();
152  virtual void GetCellAlphaRange(double& mn, double& mx);
153  virtual void GetCellAlphaRange(double rng[2]);
154 
156 
157  vtkGetObjectMacro(CellLookupTable, vtkScalarsToColors);
158  virtual void SetCellLookupTable(vtkScalarsToColors* lut);
160 
162 
163  vtkSetMacro(ScaleCellLookupTable, bool);
164  vtkGetMacro(ScaleCellLookupTable, bool);
165  vtkBooleanMacro(ScaleCellLookupTable, bool);
167 
169 
170  vtkSetVector3Macro(OutlineColor, double);
171  vtkGetVector3Macro(OutlineColor, double);
173 
175 
176  vtkSetVector3Macro(SelectedPointColor, double);
177  vtkGetVector3Macro(SelectedPointColor, double);
178  vtkSetMacro(SelectedPointOpacity, double);
179  vtkGetMacro(SelectedPointOpacity, double);
181 
183 
184  vtkSetVector3Macro(SelectedCellColor, double);
185  vtkGetVector3Macro(SelectedCellColor, double);
186  vtkSetMacro(SelectedCellOpacity, double);
187  vtkGetMacro(SelectedCellOpacity, double);
189 
191 
192  vtkSetVector3Macro(BackgroundColor, double);
193  vtkGetVector3Macro(BackgroundColor, double);
195 
197 
198  vtkSetVector3Macro(BackgroundColor2, double);
199  vtkGetVector3Macro(BackgroundColor2, double);
201 
203 
204  virtual void SetPointTextProperty(vtkTextProperty* tprop);
205  vtkGetObjectMacro(PointTextProperty, vtkTextProperty);
207 
209 
210  virtual void SetCellTextProperty(vtkTextProperty* tprop);
211  vtkGetObjectMacro(CellTextProperty, vtkTextProperty);
213 
215 
217  virtual void SetVertexLabelColor(double r, double g, double b);
218  virtual void SetVertexLabelColor(double c[3])
219  { this->SetVertexLabelColor(c[0], c[1], c[2]); }
220  virtual double *GetVertexLabelColor();
221  virtual void GetVertexLabelColor(double &r, double &g, double &b)
222  { double* c = this->GetVertexLabelColor(); if (c) { r = c[0]; g = c[1]; b = c[2]; } }
223  virtual void GetVertexLabelColor(double c[3])
224  { this->GetVertexLabelColor(c[0], c[1], c[2]); }
226 
228 
230  virtual void SetEdgeLabelColor(double r, double g, double b);
231  virtual void SetEdgeLabelColor(double c[3])
232  { this->SetEdgeLabelColor(c[0], c[1], c[2]); }
233  virtual double *GetEdgeLabelColor();
234  virtual void GetEdgeLabelColor(double &r, double &g, double &b)
235  { double* c = this->GetEdgeLabelColor(); if (c) { r = c[0]; g = c[1]; b = c[2]; } }
236  virtual void GetEdgeLabelColor(double c[3])
237  { this->GetEdgeLabelColor(c[0], c[1], c[2]); }
239 
241 
244  static vtkViewTheme* CreateOceanTheme();
245  static vtkViewTheme* CreateMellowTheme();
246  static vtkViewTheme* CreateNeonTheme();
248 
250 
252  bool LookupMatchesPointTheme(vtkScalarsToColors* s2c);
253  bool LookupMatchesCellTheme(vtkScalarsToColors* s2c);
255 
256 protected:
257  vtkViewTheme();
258  ~vtkViewTheme();
259 
260  double PointSize;
261  double LineWidth;
262 
263  double PointColor[3];
264  double PointOpacity;
265 
266  double CellColor[3];
267  double CellOpacity;
268 
269  double OutlineColor[3];
270 
271  double SelectedPointColor[3];
273  double SelectedCellColor[3];
275 
276  double BackgroundColor[3];
277  double BackgroundColor2[3];
278 
281 
284 
287 
288 private:
289  vtkViewTheme(const vtkViewTheme&); // Not implemented.
290  void operator=(const vtkViewTheme&); // Not implemented.
291 };
292 
293 #endif
294 
double LineWidth
Definition: vtkViewTheme.h:261
abstract base class for most VTK objects
Definition: vtkObject.h:61
virtual void GetVertexLabelColor(double &r, double &g, double &b)
Definition: vtkViewTheme.h:221
bool ScalePointLookupTable
Definition: vtkViewTheme.h:282
virtual void SetVertexLabelColor(double c[3])
Definition: vtkViewTheme.h:218
Superclass for mapping scalar values to colors.
Sets theme colors for a graphical view.
Definition: vtkViewTheme.h:47
vtkScalarsToColors * CellLookupTable
Definition: vtkViewTheme.h:280
virtual void PrintSelf(ostream &os, vtkIndent indent)
double SelectedPointOpacity
Definition: vtkViewTheme.h:272
a simple class to control print indentation
Definition: vtkIndent.h:38
#define VTKVIEWSCORE_EXPORT
vtkScalarsToColors * PointLookupTable
Definition: vtkViewTheme.h:279
represent text properties.
double PointSize
Definition: vtkViewTheme.h:260
virtual void GetVertexLabelColor(double c[3])
Definition: vtkViewTheme.h:223
virtual void SetEdgeLabelColor(double c[3])
Definition: vtkViewTheme.h:231
virtual void GetEdgeLabelColor(double &r, double &g, double &b)
Definition: vtkViewTheme.h:234
double PointOpacity
Definition: vtkViewTheme.h:264
vtkTextProperty * CellTextProperty
Definition: vtkViewTheme.h:286
static vtkObject * New()
double SelectedCellOpacity
Definition: vtkViewTheme.h:274
vtkTextProperty * PointTextProperty
Definition: vtkViewTheme.h:285
bool ScaleCellLookupTable
Definition: vtkViewTheme.h:283
double CellOpacity
Definition: vtkViewTheme.h:267
virtual void GetEdgeLabelColor(double c[3])
Definition: vtkViewTheme.h:236