VTK  9.3.1
vtkXYPlotRepresentation.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
3 
21 #ifndef vtkXYPlotRepresentation_h
22 #define vtkXYPlotRepresentation_h
23 
25 #include "vtkInteractionWidgetsModule.h" // For export macro
26 
27 VTK_ABI_NAMESPACE_BEGIN
28 class vtkXYPlotActor;
29 
30 class VTKINTERACTIONWIDGETS_EXPORT vtkXYPlotRepresentation : public vtkBorderRepresentation
31 {
32 public:
34  virtual void PrintSelf(ostream& os, vtkIndent indent);
35  static vtkXYPlotRepresentation* New();
36 
38 
41  vtkGetObjectMacro(XYPlotActor, vtkXYPlotActor);
42  virtual void SetXYPlotActor(vtkXYPlotActor*);
44 
46 
49  void BuildRepresentation() override;
50  void WidgetInteraction(double eventPos[2]) override;
51  void GetSize(double size[2]) override
52  {
53  size[0] = 2.0;
54  size[1] = 2.0;
55  }
57 
59 
63  virtual int GetVisibility();
64  virtual void SetVisibility(int);
65  virtual void GetActors2D(vtkPropCollection* collection);
66  virtual void ReleaseGraphicsResources(vtkWindow* window);
67  virtual int RenderOverlay(vtkViewport*);
68  virtual int RenderOpaqueGeometry(vtkViewport*);
72 
74 
77  void SetGlyphSize(double x);
78  void SetPlotGlyphType(int curve, int glyph);
80 
82 
85  void SetTitle(const char* title);
86  void SetTitleColor(double r, double g, double b);
87  void SetTitleFontFamily(int x);
88  void SetTitleBold(int x);
89  void SetTitleItalic(int x);
90  void SetTitleShadow(int x);
91  void SetTitleFontSize(int x);
92  void SetTitleJustification(int x);
93  void SetTitleVerticalJustification(int x);
94  void SetAdjustTitlePosition(int x);
95  void SetTitlePosition(double x, double y);
97 
99 
102  void SetXAxisColor(double r, double g, double b);
103  void SetYAxisColor(double r, double g, double b);
104  void SetXTitle(const char* ytitle);
105  char* GetXTitle();
106  void SetXRange(double min, double max);
107  void SetYTitle(const char* ytitle);
108  char* GetYTitle();
109  void SetYRange(double min, double max);
110  void SetYTitlePosition(int pos);
111  int GetYTitlePosition() const;
112  void SetXValues(int x);
114 
116 
119  void SetAxisTitleColor(double r, double g, double b);
120  void SetAxisTitleFontFamily(int x);
121  void SetAxisTitleBold(int x);
122  void SetAxisTitleItalic(int x);
123  void SetAxisTitleShadow(int x);
124  void SetAxisTitleFontSize(int x);
125  void SetAxisTitleJustification(int x);
126  void SetAxisTitleVerticalJustification(int x);
128 
130 
133  void SetAxisLabelColor(double r, double g, double b);
134  void SetAxisLabelFontFamily(int x);
135  void SetAxisLabelBold(int x);
136  void SetAxisLabelItalic(int x);
137  void SetAxisLabelShadow(int x);
138  void SetAxisLabelFontSize(int x);
139  void SetAxisLabelJustification(int x);
140  void SetAxisLabelVerticalJustification(int x);
141  void SetXLabelFormat(const char* _arg);
142  void SetYLabelFormat(const char* _arg);
144 
146 
149  void SetBorder(int x);
150  void RemoveAllActiveCurves();
151  void AddUserCurvesPoint(double c, double x, double y);
152  void SetLegend(int x);
153  void SetLegendBorder(int b);
154  void SetLegendBox(int b);
155  void SetLegendBoxColor(double r, double g, double b);
156  void SetLegendPosition(double x, double y);
157  void SetLegendPosition2(double x, double y);
158  void SetLineWidth(double w);
159  void SetPlotColor(int i, int r, int g, int b);
160  void SetPlotLines(int i);
161  void SetPlotPoints(int i);
162  void SetPlotLabel(int i, const char* label);
164 
165 protected:
167  ~vtkXYPlotRepresentation() override;
168 
170 
171 private:
173  void operator=(const vtkXYPlotRepresentation&) = delete;
174 };
175 
176 VTK_ABI_NAMESPACE_END
177 #endif // vtkXYPlotRepresentation_h
int RenderOverlay(vtkViewport *) override
These methods are necessary to make this representation behave as a vtkProp.
generate an x-y plot from input dataset(s) or field data
void WidgetInteraction(double eventPos[2]) override
Subclasses should implement these methods.
vtkTypeBool HasTranslucentPolygonalGeometry() override
These methods are necessary to make this representation behave as a vtkProp.
abstract specification for Viewports
Definition: vtkViewport.h:44
int RenderOpaqueGeometry(vtkViewport *) override
These methods are necessary to make this representation behave as a vtkProp.
void GetActors2D(vtkPropCollection *) override
These methods are necessary to make this representation behave as a vtkProp.
virtual vtkTypeBool GetVisibility()
Set/Get visibility of this vtkProp.
virtual void SetVisibility(vtkTypeBool)
Set/Get visibility of this vtkProp.
static vtkBorderRepresentation * New()
Instantiate this class.
an ordered list of Props
void PrintSelf(ostream &os, vtkIndent indent) override
Define standard methods.
int vtkTypeBool
Definition: vtkABI.h:64
window superclass for vtkRenderWindow
Definition: vtkWindow.h:27
int RenderTranslucentPolygonalGeometry(vtkViewport *) override
These methods are necessary to make this representation behave as a vtkProp.
void BuildRepresentation() override
Subclasses should implement these methods.
a simple class to control print indentation
Definition: vtkIndent.h:28
represent XY plot for vtkXYPlotWidget
void ReleaseGraphicsResources(vtkWindow *) override
These methods are necessary to make this representation behave as a vtkProp.
represent a vtkBorderWidget
void GetSize(double size[2]) override
Satisfy the superclass' API.
#define max(a, b)