VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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  virtual void GetBorders(int borders[4])
66  {
67  for(int i=0;i<4;i++)
68  {
69  borders[i]=this->Borders[i];
70  }
71  }
73 
75  virtual void SetGutter(const vtkVector2f& gutter);
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 
107  virtual vtkVector2i GetChartIndex(const vtkVector2f& position);
108 
109 protected:
110  vtkChartMatrix();
111  ~vtkChartMatrix();
112 
113  class PIMPL;
114  PIMPL *Private;
115 
116  // The number of charts in x and y.
118 
119  // The gutter between each chart.
121  int Borders[4];
123 
124 private:
125  vtkChartMatrix(const vtkChartMatrix &); // Not implemented.
126  void operator=(const vtkChartMatrix &); // Not implemented.
127 };
128 
129 #endif //__vtkChartMatrix_h
GLsizeiptr size
Definition: vtkgl.h:11843
vtkVector2i Size
virtual bool Paint(vtkContext2D *painter)
virtual vtkVector2i GetSize() const
vtkVector2f Gutter
GLdouble GLdouble right
Definition: vtkgl.h:18180
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:619
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
GLdouble GLdouble GLdouble GLdouble top
Definition: vtkgl.h:18180
virtual void GetBorders(int borders[4])
container for a matrix of charts.
GLint left
Definition: vtkgl.h:14367
base class for items that are part of a vtkContextScene.
GLenum GLenum GLvoid GLvoid GLvoid * span
Definition: vtkgl.h:11352
virtual vtkVector2f GetGutter() const
static vtkObject * New()
GLint GLint bottom
Definition: vtkgl.h:14367
virtual void Update()
#define VTKCHARTSCORE_EXPORT
virtual void PrintSelf(ostream &os, vtkIndent indent)