vtkPVPlotMatrixView.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
3 
4 #ifndef vtkPVPlotMatrixView_h
5 #define vtkPVPlotMatrixView_h
6 
7 #include "vtkPVContextView.h"
8 #include "vtkRemotingViewsModule.h" //needed for exports
9 
11 
12 #define GENERATE_PLOT_TYPE_DECLARATION(name, type) \
13  void SetScatterPlot##name(type value); \
14  void SetHistogram##name(type value); \
15  void SetActivePlot##name(type value);
16 
17 #define GENERATE_PLOT_TYPE_DECLARATION2(name, type1, type2) \
18  void SetScatterPlot##name(type1 value1, type2 value2); \
19  void SetHistogram##name(type1 value1, type2 value2); \
20  void SetActivePlot##name(type1 value1, type2 value2);
21 
22 #define GENERATE_PLOT_TYPE_DECLARATION3(name, type1, type2, type3) \
23  void SetScatterPlot##name(type1 value1, type2 value2, type3 value3); \
24  void SetHistogram##name(type1 value1, type2 value2, type3 value3); \
25  void SetActivePlot##name(type1 value1, type2 value2, type3 value3);
26 
27 #define GENERATE_PLOT_TYPE_DECLARATION4(name, type1, type2, type3, type4) \
28  void SetScatterPlot##name(type1 value1, type2 value2, type3 value3, type4 value4); \
29  void SetHistogram##name(type1 value1, type2 value2, type3 value3, type4 value4); \
30  void SetActivePlot##name(type1 value1, type2 value2, type3 value3, type4 value4);
31 
33 {
34 public:
35  static vtkPVPlotMatrixView* New();
37  void PrintSelf(ostream& os, vtkIndent indent) override;
38 
40 
48  void SetSelection(vtkChartRepresentation* repr, vtkSelection* selection) override;
49 
51 
54  void SetActivePlot(int i, int j);
55  int GetActiveRow();
56  int GetActiveColumn();
58 
62  void ClearAnimationPath();
63 
67  void AddAnimationPath(int i, int j);
68 
72  void StartAnimationPath();
73 
77  void AdvanceAnimationPath();
78 
80 
86  void SetTitleFont(const char* family, int pointSize, bool bold, bool italic) override;
87  void SetTitleFontFamily(const char* family) override;
88  void SetTitleFontSize(int pointSize) override;
89  void SetTitleBold(bool bold) override;
90  void SetTitleItalic(bool italic) override;
91  void SetTitleFontFile(const char* file) override;
92  const char* GetTitleFontFamily() override;
93  int GetTitleFontSize() override;
94  int GetTitleFontBold() override;
95  int GetTitleFontItalic() override;
97 
99 
105  void SetTitleColor(double red, double green, double blue) override;
106  double* GetTitleColor() override;
108 
110 
116  void SetTitleAlignment(int alignment) override;
117  int GetTitleAlignment() override;
119 
123  void SetNumberOfAnimationFrames(int value);
124 
126 
132  virtual void SetGutter(float x, float y);
133  void SetGutterX(float value);
134  void SetGutterY(float value);
136 
138 
141  virtual void SetPadding(float padding);
143 
145 
151  virtual void SetBorders(int left, int bottom, int right, int top);
152  virtual void SetBorderLeft(int value);
153  virtual void SetBorderBottom(int value);
154  virtual void SetBorderRight(int value);
155  virtual void SetBorderTop(int value);
157 
159 
166  void SetGridVisibility(int plotType, bool visible);
167  GENERATE_PLOT_TYPE_DECLARATION(GridVisibility, bool);
168  int GetGridVisibility(int plotType);
170 
172 
180  void SetBackgroundColor(int plotType, double red, double green, double blue, double alpha);
181  bool GetBackgroundColor(int plotType, double color[3]);
182  GENERATE_PLOT_TYPE_DECLARATION4(BackgroundColor, double, double, double, double);
184 
186 
194  void SetAxisColor(int plotType, double red, double green, double blue);
195  bool GetAxisColor(int plotType, double color[3]);
196  GENERATE_PLOT_TYPE_DECLARATION3(AxisColor, double, double, double);
198 
200 
208  void SetGridColor(int plotType, double red, double green, double blue);
209  bool GetGridColor(int plotType, double color[3]);
210  GENERATE_PLOT_TYPE_DECLARATION3(GridColor, double, double, double);
212 
214 
221  void SetAxisLabelVisibility(int plotType, bool visible);
222  int GetAxisLabelVisibility(int plotType);
223  GENERATE_PLOT_TYPE_DECLARATION(AxisLabelVisibility, bool);
225 
227 
234  void SetAxisLabelFont(int plotType, const char* family, int pointSize, bool bold, bool italic);
235  void SetAxisLabelFontFamily(int plotType, const char* family);
236  GENERATE_PLOT_TYPE_DECLARATION(AxisLabelFontFamily, const char*);
237  void SetAxisLabelFontFile(int plotType, const char* file);
238  GENERATE_PLOT_TYPE_DECLARATION(AxisLabelFontFile, const char*);
239  void SetAxisLabelFontSize(int plotType, int pointSize);
240  GENERATE_PLOT_TYPE_DECLARATION(AxisLabelFontSize, int);
241  void SetAxisLabelBold(int plotType, bool bold);
242  GENERATE_PLOT_TYPE_DECLARATION(AxisLabelBold, bool);
243  void SetAxisLabelItalic(int plotType, bool italic);
244  GENERATE_PLOT_TYPE_DECLARATION(AxisLabelItalic, bool);
245  const char* GetAxisLabelFontFamily(int plotType);
246  int GetAxisLabelFontSize(int plotType);
247  int GetAxisLabelFontBold(int plotType);
248  int GetAxisLabelFontItalic(int plotType);
250 
252 
260  void SetAxisLabelColor(int plotType, double red, double green, double blue);
261  GENERATE_PLOT_TYPE_DECLARATION3(AxisLabelColor, double, double, double);
262  bool GetAxisLabelColor(int plotType, double color[3]);
264 
266 
273  void SetAxisLabelNotation(int plotType, int notation);
274  GENERATE_PLOT_TYPE_DECLARATION(AxisLabelNotation, int);
275  int GetAxisLabelNotation(int plotType);
277 
279 
286  void SetAxisLabelPrecision(int plotType, int precision);
287  GENERATE_PLOT_TYPE_DECLARATION(AxisLabelPrecision, int);
288  int GetAxisLabelPrecision(int plotType);
290 
292 
299  void SetTooltipNotation(int plotType, int notation);
300  GENERATE_PLOT_TYPE_DECLARATION(TooltipNotation, int);
301  void SetTooltipPrecision(int plotType, int precision);
302  GENERATE_PLOT_TYPE_DECLARATION(TooltipPrecision, int);
303  int GetTooltipNotation(int plotType);
304  int GetTooltipPrecision(int plotType);
306 
308 
315  void SetScatterPlotSelectedRowColumnColor(double red, double green, double blue, double alpha);
316  bool GetScatterPlotSelectedRowColumnColor(double color[3]);
318 
320 
327  void SetScatterPlotSelectedActiveColor(double red, double green, double blue, double alpha);
328  bool GetScatterPlotSelectedActiveColor(double color[3]);
330 
334  void UpdateSettings();
335 
336 protected:
338  ~vtkPVPlotMatrixView() override;
339 
343  void Render(bool interactive) override;
344 
349  void PlotMatrixSelectionCallback(vtkObject*, unsigned long, void*);
350 
351 private:
352  vtkPVPlotMatrixView(const vtkPVPlotMatrixView&) = delete;
353  void operator=(const vtkPVPlotMatrixView&) = delete;
354 
355  vtkScatterPlotMatrix* PlotMatrix;
356 };
357 
358 #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.