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 "vtkAbstractContextItem.h"
32 #include "vtkVector.h" // For ivars
33 
34 class vtkChart;
35 
37 {
38 public:
40  virtual void PrintSelf(ostream &os, vtkIndent indent);
41 
43  static vtkChartMatrix *New();
44 
47  virtual void Update();
48 
50  virtual bool Paint(vtkContext2D *painter);
51 
55  virtual void SetSize(const vtkVector2i& size);
56 
58  virtual vtkVector2i GetSize() const { return this->Size; }
59 
61  virtual void SetGutter(const vtkVector2f& gutter);
62 
64 
66  virtual void SetBorders(int left, int bottom, int right, int top);
67  virtual void GetBorders(int borders[4])
68  {
69  for(int i=0;i<4;i++)
70  {
71  borders[i]=this->Borders[i];
72  }
73  }
75 
77  virtual vtkVector2f GetGutter() const { return this->Gutter; }
78 
80  virtual void Allocate();
81 
86  virtual bool SetChart(const vtkVector2i& position, vtkChart* chart);
87 
91  virtual vtkChart* GetChart(const vtkVector2i& position);
92 
94 
97  virtual bool SetChartSpan(const vtkVector2i& position,
98  const vtkVector2i& span);
100 
102  virtual vtkVector2i GetChartSpan(const vtkVector2i& position);
103 
104 protected:
105  vtkChartMatrix();
106  ~vtkChartMatrix();
107 
108  class PIMPL;
109  PIMPL *Private;
110 
111  // The number of charts in x and y.
113 
114  // The gutter between each chart.
116  int Borders[4];
118 
119 private:
120  vtkChartMatrix(const vtkChartMatrix &); // Not implemented.
121  void operator=(const vtkChartMatrix &); // Not implemented.
122 };
123 
124 #endif //__vtkChartMatrix_h