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 
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 
64  virtual void SetBorders(int left, int bottom, int right, int top);
65  void SetBorderLeft(int value);
66  void SetBorderBottom(int value);
67  void SetBorderRight(int value);
68  void SetBorderTop(int value);
69  virtual void GetBorders(int borders[4])
70  {
71  for(int i=0;i<4;i++)
72  {
73  borders[i]=this->Borders[i];
74  }
75  }
77 
79 
80  virtual void SetGutter(const vtkVector2f& gutter);
81  void SetGutterX(float value);
82  void SetGutterY(float value);
84 
86  virtual vtkVector2f GetGutter() const { return this->Gutter; }
87 
89  virtual void Allocate();
90 
95  virtual bool SetChart(const vtkVector2i& position, vtkChart* chart);
96 
100  virtual vtkChart* GetChart(const vtkVector2i& position);
101 
103 
106  virtual bool SetChartSpan(const vtkVector2i& position,
107  const vtkVector2i& span);
109 
111  virtual vtkVector2i GetChartSpan(const vtkVector2i& position);
112 
115  virtual vtkVector2i GetChartIndex(const vtkVector2f& position);
116 
117 protected:
118  vtkChartMatrix();
119  ~vtkChartMatrix();
120 
121  class PIMPL;
122  PIMPL *Private;
123 
124  // The number of charts in x and y.
126 
127  // The gutter between each chart.
129  int Borders[4];
131 
132 private:
133  vtkChartMatrix(const vtkChartMatrix &); // Not implemented.
134  void operator=(const vtkChartMatrix &); // Not implemented.
135 };
136 
137 #endif //vtkChartMatrix_h
vtkVector2i Size
virtual bool Paint(vtkContext2D *painter)
virtual vtkVector2i GetSize() const
vtkVector2f Gutter
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:56
Factory class for drawing 2D charts.
Definition: vtkChart.h:49
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual void GetBorders(int borders[4])
container for a matrix of charts.
base class for items that are part of a vtkContextScene.
virtual vtkVector2f GetGutter() const
static vtkObject * New()
virtual void Update()
#define VTKCHARTSCORE_EXPORT
virtual void PrintSelf(ostream &os, vtkIndent indent)