VTK
vtkChartMatrix.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkChartMatrix.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 
28 #ifndef __vtkChartMatrix_h
29 #define __vtkChartMatrix_h
30 
31 #include "vtkChartsCoreModule.h" // For export macro
32 #include "vtkAbstractContextItem.h"
33 #include "vtkVector.h" // For ivars
34 
35 class vtkChart;
36 
37 class VTKCHARTSCORE_EXPORT vtkChartMatrix : public vtkAbstractContextItem
38 {
39 public:
41  virtual void PrintSelf(ostream &os, vtkIndent indent);
42 
44  static vtkChartMatrix *New();
45 
48  virtual void Update();
49 
51  virtual bool Paint(vtkContext2D *painter);
52 
56  virtual void SetSize(const vtkVector2i& size);
57 
59  virtual vtkVector2i GetSize() const { return this->Size; }
60 
62  virtual void SetGutter(const vtkVector2f& gutter);
63 
65 
67  virtual void SetBorders(int left, int bottom, int right, int top);
68  virtual void GetBorders(int borders[4])
69  {
70  for(int i=0;i<4;i++)
71  {
72  borders[i]=this->Borders[i];
73  }
74  }
76 
78  virtual vtkVector2f GetGutter() const { return this->Gutter; }
79 
81  virtual void Allocate();
82 
87  virtual bool SetChart(const vtkVector2i& position, vtkChart* chart);
88 
92  virtual vtkChart* GetChart(const vtkVector2i& position);
93 
95 
98  virtual bool SetChartSpan(const vtkVector2i& position,
99  const vtkVector2i& span);
101 
103  virtual vtkVector2i GetChartSpan(const vtkVector2i& position);
104 
105 protected:
106  vtkChartMatrix();
107  ~vtkChartMatrix();
108 
109  class PIMPL;
110  PIMPL *Private;
111 
112  // The number of charts in x and y.
114 
115  // The gutter between each chart.
117  int Borders[4];
119 
120 private:
121  vtkChartMatrix(const vtkChartMatrix &); // Not implemented.
122  void operator=(const vtkChartMatrix &); // Not implemented.
123 };
124 
125 #endif //__vtkChartMatrix_h