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);
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 
101 
103 
106  virtual bool SetChartSpan(const vtkVector2i& position,
107  const vtkVector2i& span);
109 
112 
116 
117 protected:
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
vtkChart
Factory class for drawing 2D charts.
Definition: vtkChart.h:50
vtkChartsCoreModule.h
vtkChartMatrix::SetBorderBottom
void SetBorderBottom(int value)
vtkChartMatrix::~vtkChartMatrix
~vtkChartMatrix()
vtkChartMatrix::Gutter
vtkVector2f Gutter
Definition: vtkChartMatrix.h:128
vtkAbstractContextItem
base class for items that are part of a vtkContextScene.
Definition: vtkAbstractContextItem.h:40
vtkChartMatrix::GetSize
virtual vtkVector2i GetSize() const
Definition: vtkChartMatrix.h:59
vtkChartMatrix::Size
vtkVector2i Size
Definition: vtkChartMatrix.h:125
vtkChartMatrix::Paint
virtual bool Paint(vtkContext2D *painter)
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkChartMatrix
container for a matrix of charts.
Definition: vtkChartMatrix.h:38
vtkVector.h
vtkChartMatrix::SetBorders
virtual void SetBorders(int left, int bottom, int right, int top)
vtkContext2D
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:57
vtkgl::left
GLint left
Definition: vtkgl.h:14367
vtkChartMatrix::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
vtkgl::bottom
GLint GLint bottom
Definition: vtkgl.h:14367
vtkChartMatrix::Private
PIMPL * Private
Definition: vtkChartMatrix.h:121
vtkX3D::position
@ position
Definition: vtkX3D.h:261
vtkgl::right
GLdouble GLdouble right
Definition: vtkgl.h:18180
vtkChartMatrix::GetChartIndex
virtual vtkVector2i GetChartIndex(const vtkVector2f &position)
vtkChartMatrix::GetBorders
virtual void GetBorders(int borders[4])
Definition: vtkChartMatrix.h:69
vtkgl::value
GLsizei const GLfloat * value
Definition: vtkgl.h:12021
vtkChartMatrix::SetSize
virtual void SetSize(const vtkVector2i &size)
vtkChartMatrix::Allocate
virtual void Allocate()
vtkChartMatrix::SetBorderRight
void SetBorderRight(int value)
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkChartMatrix::GetChartSpan
virtual vtkVector2i GetChartSpan(const vtkVector2i &position)
vtkChartMatrix::vtkChartMatrix
vtkChartMatrix()
vtkChartMatrix::GetGutter
virtual vtkVector2f GetGutter() const
Definition: vtkChartMatrix.h:86
vtkgl::top
GLdouble GLdouble GLdouble GLdouble top
Definition: vtkgl.h:18180
vtkChartMatrix::New
static vtkChartMatrix * New()
vtkChartMatrix::SetChartSpan
virtual bool SetChartSpan(const vtkVector2i &position, const vtkVector2i &span)
vtkChartMatrix::SetBorderLeft
void SetBorderLeft(int value)
vtkAbstractContextItem.h
vtkChartMatrix::SetGutterX
void SetGutterX(float value)
vtkChartMatrix::Update
virtual void Update()
vtkChartMatrix::LayoutIsDirty
bool LayoutIsDirty
Definition: vtkChartMatrix.h:130
vtkChartMatrix::GetChart
virtual vtkChart * GetChart(const vtkVector2i &position)
vtkgl::span
GLenum GLenum GLvoid GLvoid GLvoid * span
Definition: vtkgl.h:11352
vtkChartMatrix::SetBorderTop
void SetBorderTop(int value)
vtkVector2i
Definition: vtkVector.h:266
vtkChartMatrix::SetGutterY
void SetGutterY(float value)
VTKCHARTSCORE_EXPORT
#define VTKCHARTSCORE_EXPORT
Definition: vtkChartsCoreModule.h:15
vtkVector2f
Definition: vtkVector.h:277
vtkChartMatrix::SetChart
virtual bool SetChart(const vtkVector2i &position, vtkChart *chart)
vtkChartMatrix::SetGutter
virtual void SetGutter(const vtkVector2f &gutter)
vtkgl::size
GLsizeiptr size
Definition: vtkgl.h:11843