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 "vtkRemotingViewsModule.h" //needed for exports
21 
23 
24 #define GENERATE_PLOT_TYPE_DECLARATION(name, type) \
25  void SetScatterPlot##name(type value); \
26  void SetHistogram##name(type value); \
27  void SetActivePlot##name(type value);
28 
29 #define GENERATE_PLOT_TYPE_DECLARATION2(name, type1, type2) \
30  void SetScatterPlot##name(type1 value1, type2 value2); \
31  void SetHistogram##name(type1 value1, type2 value2); \
32  void SetActivePlot##name(type1 value1, type2 value2);
33 
34 #define GENERATE_PLOT_TYPE_DECLARATION3(name, type1, type2, type3) \
35  void SetScatterPlot##name(type1 value1, type2 value2, type3 value3); \
36  void SetHistogram##name(type1 value1, type2 value2, type3 value3); \
37  void SetActivePlot##name(type1 value1, type2 value2, type3 value3);
38 
39 #define GENERATE_PLOT_TYPE_DECLARATION4(name, type1, type2, type3, type4) \
40  void SetScatterPlot##name(type1 value1, type2 value2, type3 value3, type4 value4); \
41  void SetHistogram##name(type1 value1, type2 value2, type3 value3, type4 value4); \
42  void SetActivePlot##name(type1 value1, type2 value2, type3 value3, type4 value4);
43 
45 {
46 public:
47  static vtkPVPlotMatrixView* New();
49  void PrintSelf(ostream& os, vtkIndent indent) override;
50 
52 
60  void SetSelection(vtkChartRepresentation* repr, vtkSelection* selection) override;
61 
63 
66  void SetActivePlot(int i, int j);
67  int GetActiveRow();
68  int GetActiveColumn();
70 
74  void ClearAnimationPath();
75 
79  void AddAnimationPath(int i, int j);
80 
84  void StartAnimationPath();
85 
89  void AdvanceAnimationPath();
90 
92 
98  void SetTitleFont(const char* family, int pointSize, bool bold, bool italic) override;
99  void SetTitleFontFamily(const char* family) override;
100  void SetTitleFontSize(int pointSize) override;
101  void SetTitleBold(bool bold) override;
102  void SetTitleItalic(bool italic) override;
103  void SetTitleFontFile(const char* file) override;
104  const char* GetTitleFontFamily() override;
105  int GetTitleFontSize() override;
106  int GetTitleFontBold() override;
107  int GetTitleFontItalic() override;
109 
111 
117  void SetTitleColor(double red, double green, double blue) override;
118  double* GetTitleColor() override;
120 
122 
128  void SetTitleAlignment(int alignment) override;
129  int GetTitleAlignment() override;
131 
135  void SetNumberOfAnimationFrames(int value);
136 
138 
144  virtual void SetGutter(float x, float y);
145  void SetGutterX(float value);
146  void SetGutterY(float value);
148 
150 
156  virtual void SetBorders(int left, int bottom, int right, int top);
157  virtual void SetBorderLeft(int value);
158  virtual void SetBorderBottom(int value);
159  virtual void SetBorderRight(int value);
160  virtual void SetBorderTop(int value);
162 
164 
171  void SetGridVisibility(int plotType, bool visible);
172  GENERATE_PLOT_TYPE_DECLARATION(GridVisibility, bool);
173  int GetGridVisibility(int plotType);
175 
177 
184  void SetBackgroundColor(int plotType, double red, double green, double blue, double alpha);
185  double* GetBackgroundColor(int plotType);
186  GENERATE_PLOT_TYPE_DECLARATION4(BackgroundColor, double, double, double, double);
188 
190 
197  void SetAxisColor(int plotType, double red, double green, double blue);
198  double* GetAxisColor(int plotType);
199  GENERATE_PLOT_TYPE_DECLARATION3(AxisColor, double, double, double);
201 
203 
210  void SetGridColor(int plotType, double red, double green, double blue);
211  double* GetGridColor(int plotType);
212  GENERATE_PLOT_TYPE_DECLARATION3(GridColor, double, double, double);
214 
216 
223  void SetAxisLabelVisibility(int plotType, bool visible);
224  int GetAxisLabelVisibility(int plotType);
225  GENERATE_PLOT_TYPE_DECLARATION(AxisLabelVisibility, bool);
227 
229 
236  void SetAxisLabelFont(int plotType, const char* family, int pointSize, bool bold, bool italic);
237  void SetAxisLabelFontFamily(int plotType, const char* family);
238  GENERATE_PLOT_TYPE_DECLARATION(AxisLabelFontFamily, const char*);
239  void SetAxisLabelFontFile(int plotType, const char* file);
240  GENERATE_PLOT_TYPE_DECLARATION(AxisLabelFontFile, const char*);
241  void SetAxisLabelFontSize(int plotType, int pointSize);
242  GENERATE_PLOT_TYPE_DECLARATION(AxisLabelFontSize, int);
243  void SetAxisLabelBold(int plotType, bool bold);
244  GENERATE_PLOT_TYPE_DECLARATION(AxisLabelBold, bool);
245  void SetAxisLabelItalic(int plotType, bool italic);
246  GENERATE_PLOT_TYPE_DECLARATION(AxisLabelItalic, bool);
247  const char* GetAxisLabelFontFamily(int plotType);
248  int GetAxisLabelFontSize(int plotType);
249  int GetAxisLabelFontBold(int plotType);
250  int GetAxisLabelFontItalic(int plotType);
252 
254 
261  void SetAxisLabelColor(int plotType, double red, double green, double blue);
262  GENERATE_PLOT_TYPE_DECLARATION3(AxisLabelColor, double, double, double);
263  double* GetAxisLabelColor(int plotType);
265 
267 
274  void SetAxisLabelNotation(int plotType, int notation);
275  GENERATE_PLOT_TYPE_DECLARATION(AxisLabelNotation, int);
276  int GetAxisLabelNotation(int plotType);
278 
280 
287  void SetAxisLabelPrecision(int plotType, int precision);
288  GENERATE_PLOT_TYPE_DECLARATION(AxisLabelPrecision, int);
289  int GetAxisLabelPrecision(int plotType);
291 
293 
300  void SetTooltipNotation(int plotType, int notation);
301  GENERATE_PLOT_TYPE_DECLARATION(TooltipNotation, int);
302  void SetTooltipPrecision(int plotType, int precision);
303  GENERATE_PLOT_TYPE_DECLARATION(TooltipPrecision, int);
304  int GetTooltipNotation(int plotType);
305  int GetTooltipPrecision(int plotType);
307 
309 
315  void SetScatterPlotSelectedRowColumnColor(double red, double green, double blue, double alpha);
316  double* GetScatterPlotSelectedRowColumnColor();
318 
320 
326  void SetScatterPlotSelectedActiveColor(double red, double green, double blue, double alpha);
327  double* GetScatterPlotSelectedActiveColor();
329 
333  void UpdateSettings();
334 
335 protected:
337  ~vtkPVPlotMatrixView() override;
338 
342  void Render(bool interactive) override;
343 
348  void PlotMatrixSelectionCallback(vtkObject*, unsigned long, void*);
349 
350 private:
351  vtkPVPlotMatrixView(const vtkPVPlotMatrixView&) = delete;
352  void operator=(const vtkPVPlotMatrixView&) = delete;
353 
354  vtkScatterPlotMatrix* PlotMatrix;
355 };
356 
357 #endif
#define GENERATE_PLOT_TYPE_DECLARATION(name, type)
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.
virtual void Render(bool interactive)
Actual rendering implementation.
#define GENERATE_PLOT_TYPE_DECLARATION3(name, type1, type2, type3)
virtual vtkAbstractContextItem * GetContextItem()=0
Get the context item.