vtkPVPlotMatrixView.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkPVPlotMatrixView.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html 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 #ifndef vtkPVPlotMatrixView_h
17 #define vtkPVPlotMatrixView_h
18 
19 #include "vtkPVContextView.h"
20 #include "vtkParaViewDeprecation.h" // for PARAVIEW_DEPRECATED_IN_5_10_0
21 #include "vtkRemotingViewsModule.h" //needed for exports
22 
24 
25 #define GENERATE_PLOT_TYPE_DECLARATION(name, type) \
26  void SetScatterPlot##name(type value); \
27  void SetHistogram##name(type value); \
28  void SetActivePlot##name(type value);
29 
30 #define GENERATE_PLOT_TYPE_DECLARATION2(name, type1, type2) \
31  void SetScatterPlot##name(type1 value1, type2 value2); \
32  void SetHistogram##name(type1 value1, type2 value2); \
33  void SetActivePlot##name(type1 value1, type2 value2);
34 
35 #define GENERATE_PLOT_TYPE_DECLARATION3(name, type1, type2, type3) \
36  void SetScatterPlot##name(type1 value1, type2 value2, type3 value3); \
37  void SetHistogram##name(type1 value1, type2 value2, type3 value3); \
38  void SetActivePlot##name(type1 value1, type2 value2, type3 value3);
39 
40 #define GENERATE_PLOT_TYPE_DECLARATION4(name, type1, type2, type3, type4) \
41  void SetScatterPlot##name(type1 value1, type2 value2, type3 value3, type4 value4); \
42  void SetHistogram##name(type1 value1, type2 value2, type3 value3, type4 value4); \
43  void SetActivePlot##name(type1 value1, type2 value2, type3 value3, type4 value4);
44 
46 {
47 public:
48  static vtkPVPlotMatrixView* New();
50  void PrintSelf(ostream& os, vtkIndent indent) override;
51 
53 
61  void SetSelection(vtkChartRepresentation* repr, vtkSelection* selection) override;
62 
64 
67  void SetActivePlot(int i, int j);
68  int GetActiveRow();
69  int GetActiveColumn();
71 
75  void ClearAnimationPath();
76 
80  void AddAnimationPath(int i, int j);
81 
85  void StartAnimationPath();
86 
90  void AdvanceAnimationPath();
91 
93 
99  void SetTitleFont(const char* family, int pointSize, bool bold, bool italic) override;
100  void SetTitleFontFamily(const char* family) override;
101  void SetTitleFontSize(int pointSize) override;
102  void SetTitleBold(bool bold) override;
103  void SetTitleItalic(bool italic) override;
104  void SetTitleFontFile(const char* file) override;
105  const char* GetTitleFontFamily() override;
106  int GetTitleFontSize() override;
107  int GetTitleFontBold() override;
108  int GetTitleFontItalic() override;
110 
112 
118  void SetTitleColor(double red, double green, double blue) override;
119  double* GetTitleColor() override;
121 
123 
129  void SetTitleAlignment(int alignment) override;
130  int GetTitleAlignment() override;
132 
136  void SetNumberOfAnimationFrames(int value);
137 
139 
145  virtual void SetGutter(float x, float y);
146  void SetGutterX(float value);
147  void SetGutterY(float value);
149 
151 
157  virtual void SetBorders(int left, int bottom, int right, int top);
158  virtual void SetBorderLeft(int value);
159  virtual void SetBorderBottom(int value);
160  virtual void SetBorderRight(int value);
161  virtual void SetBorderTop(int value);
163 
165 
172  void SetGridVisibility(int plotType, bool visible);
173  GENERATE_PLOT_TYPE_DECLARATION(GridVisibility, bool);
174  int GetGridVisibility(int plotType);
176 
178 
186  void SetBackgroundColor(int plotType, double red, double green, double blue, double alpha);
187  bool GetBackgroundColor(int plotType, double color[3]);
188  GENERATE_PLOT_TYPE_DECLARATION4(BackgroundColor, double, double, double, double);
190 
192 
200  void SetAxisColor(int plotType, double red, double green, double blue);
201  bool GetAxisColor(int plotType, double color[3]);
202  GENERATE_PLOT_TYPE_DECLARATION3(AxisColor, double, double, double);
204 
206 
214  void SetGridColor(int plotType, double red, double green, double blue);
215  bool GetGridColor(int plotType, double color[3]);
216  GENERATE_PLOT_TYPE_DECLARATION3(GridColor, double, double, double);
218 
220 
227  void SetAxisLabelVisibility(int plotType, bool visible);
228  int GetAxisLabelVisibility(int plotType);
229  GENERATE_PLOT_TYPE_DECLARATION(AxisLabelVisibility, bool);
231 
233 
240  void SetAxisLabelFont(int plotType, const char* family, int pointSize, bool bold, bool italic);
241  void SetAxisLabelFontFamily(int plotType, const char* family);
242  GENERATE_PLOT_TYPE_DECLARATION(AxisLabelFontFamily, const char*);
243  void SetAxisLabelFontFile(int plotType, const char* file);
244  GENERATE_PLOT_TYPE_DECLARATION(AxisLabelFontFile, const char*);
245  void SetAxisLabelFontSize(int plotType, int pointSize);
246  GENERATE_PLOT_TYPE_DECLARATION(AxisLabelFontSize, int);
247  void SetAxisLabelBold(int plotType, bool bold);
248  GENERATE_PLOT_TYPE_DECLARATION(AxisLabelBold, bool);
249  void SetAxisLabelItalic(int plotType, bool italic);
250  GENERATE_PLOT_TYPE_DECLARATION(AxisLabelItalic, bool);
251  const char* GetAxisLabelFontFamily(int plotType);
252  int GetAxisLabelFontSize(int plotType);
253  int GetAxisLabelFontBold(int plotType);
254  int GetAxisLabelFontItalic(int plotType);
256 
258 
266  void SetAxisLabelColor(int plotType, double red, double green, double blue);
267  GENERATE_PLOT_TYPE_DECLARATION3(AxisLabelColor, double, double, double);
268  bool GetAxisLabelColor(int plotType, double color[3]);
270 
272 
279  void SetAxisLabelNotation(int plotType, int notation);
280  GENERATE_PLOT_TYPE_DECLARATION(AxisLabelNotation, int);
281  int GetAxisLabelNotation(int plotType);
283 
285 
292  void SetAxisLabelPrecision(int plotType, int precision);
293  GENERATE_PLOT_TYPE_DECLARATION(AxisLabelPrecision, int);
294  int GetAxisLabelPrecision(int plotType);
296 
298 
305  void SetTooltipNotation(int plotType, int notation);
306  GENERATE_PLOT_TYPE_DECLARATION(TooltipNotation, int);
307  void SetTooltipPrecision(int plotType, int precision);
308  GENERATE_PLOT_TYPE_DECLARATION(TooltipPrecision, int);
309  int GetTooltipNotation(int plotType);
310  int GetTooltipPrecision(int plotType);
312 
314 
321  void SetScatterPlotSelectedRowColumnColor(double red, double green, double blue, double alpha);
322  bool GetScatterPlotSelectedRowColumnColor(double color[3]);
324 
326 
333  void SetScatterPlotSelectedActiveColor(double red, double green, double blue, double alpha);
334  bool GetScatterPlotSelectedActiveColor(double color[3]);
336 
340  void UpdateSettings();
341 
343 
347  PARAVIEW_DEPRECATED_IN_5_10_0("Use `vtkPVPlotMatrixView::Get(int, double[3])` instead")
348  double* GetBackgroundColor(int plotType);
349  PARAVIEW_DEPRECATED_IN_5_10_0("Use `vtkPVPlotMatrixView::GetGridColor(int, double[3])` instead")
350  double* GetGridColor(int plotType);
351  PARAVIEW_DEPRECATED_IN_5_10_0("Use `vtkPVPlotMatrixView::GetAxisColor(int, double[3])` instead")
352  double* GetAxisColor(int plotType);
354  "Use `vtkPVPlotMatrixView::GetAxisLabelColor(int, double[3])` instead")
355  double* GetAxisLabelColor(int plotType);
357  "Use `vtkPVPlotMatrixView::GetScatterPlotSelectedRowColumnColor(double[3])` instead")
358  double* GetScatterPlotSelectedRowColumnColor();
360  "Use `vtkPVPlotMatrixView::GetScatterPlotSelectedActiveColor(double[3])` instead")
361  double* GetScatterPlotSelectedActiveColor();
363 
364 protected:
366  ~vtkPVPlotMatrixView() override;
367 
371  void Render(bool interactive) override;
372 
377  void PlotMatrixSelectionCallback(vtkObject*, unsigned long, void*);
378 
379 private:
380  vtkPVPlotMatrixView(const vtkPVPlotMatrixView&) = delete;
381  void operator=(const vtkPVPlotMatrixView&) = delete;
382 
383  vtkScatterPlotMatrix* PlotMatrix;
384 };
385 
386 #endif
#define GENERATE_PLOT_TYPE_DECLARATION(name, type)
#define PARAVIEW_DEPRECATED_IN_5_10_0(reason)
virtual void SetSelection(vtkChartRepresentation *repr, vtkSelection *selection)=0
Representations can use this method to set the selection for a particular representation.
static vtkView * New()
virtual void SetTitleFontSize(int pointSize)=0
Get/Set the font of the title.
virtual void SetTitleBold(bool bold)=0
Get/Set the font of the title.
#define VTKREMOTINGVIEWS_EXPORT
virtual int GetTitleFontBold()=0
Get/Set the font of the title.
virtual int GetTitleFontItalic()=0
Get/Set the font of the title.
virtual void SetTitleFontFile(const char *file)=0
Get/Set the font of the title.
#define GENERATE_PLOT_TYPE_DECLARATION4(name, type1, type2, type3, type4)
void PrintSelf(ostream &os, vtkIndent indent) override
virtual int GetTitleFontSize()=0
Get/Set the font of the title.
virtual int GetTitleAlignment()=0
Get/Set the alignement of the title.
virtual double * GetTitleColor()=0
Get/Set the color of the title.
virtual const char * GetTitleFontFamily()=0
Get/Set the font of the title.
virtual void SetTitleColor(double red, double green, double blue)=0
Get/Set the color of the title.
virtual void SetTitleAlignment(int alignment)=0
Get/Set the alignement of the title.
virtual void SetTitleFontFamily(const char *family)=0
Get/Set the font of the title.
vtkPVContextView adopts vtkContextView so that it can be used in ParaView configurations.
vtkChartRepresentation is the base representation for charting representations.
virtual void SetTitleFont(const char *family, int pointSize, bool bold, bool italic)=0
Get/Set the font of the title.
virtual void SetTitleItalic(bool italic)=0
Get/Set the font of the title.
#define GENERATE_PLOT_TYPE_DECLARATION3(name, type1, type2, type3)
#define const
Definition: zconf.h:238
virtual vtkAbstractContextItem * GetContextItem()=0
Get the context item.