/usr/include/vtk-7.1/vtkChartMatrix.h is in libvtk7-dev 7.1.1+dfsg1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | /*=========================================================================
Program: Visualization Toolkit
Module: vtkChartMatrix.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/**
* @class vtkChartMatrix
* @brief container for a matrix of charts.
*
*
* This class contains a matrix of charts. These charts will be of type
* vtkChartXY by default, but this can be overridden. The class will manage
* their layout and object lifetime.
*/
#ifndef vtkChartMatrix_h
#define vtkChartMatrix_h
#include "vtkChartsCoreModule.h" // For export macro
#include "vtkAbstractContextItem.h"
#include "vtkVector.h" // For ivars
#include <map> // For specific gutter
#include <utility> // For specific gutter
class vtkChart;
class VTKCHARTSCORE_EXPORT vtkChartMatrix : public vtkAbstractContextItem
{
public:
vtkTypeMacro(vtkChartMatrix, vtkAbstractContextItem);
virtual void PrintSelf(ostream &os, vtkIndent indent);
/**
* Creates a new object.
*/
static vtkChartMatrix *New();
/**
* Perform any updates to the item that may be necessary before rendering.
*/
virtual void Update();
/**
* Paint event for the chart matrix.
*/
virtual bool Paint(vtkContext2D *painter);
/**
* Set the width and height of the chart matrix. This will cause an immediate
* resize of the chart matrix, the default size is 0x0 (no charts). No chart
* objects are created until Allocate is called.
*/
virtual void SetSize(const vtkVector2i& size);
/**
* Get the width and height of the chart matrix.
*/
virtual vtkVector2i GetSize() const { return this->Size; }
//@{
/**
* Set/get the borders of the chart matrix (space in pixels around each chart).
*/
virtual void SetBorders(int left, int bottom, int right, int top);
void SetBorderLeft(int value);
void SetBorderBottom(int value);
void SetBorderRight(int value);
void SetBorderTop(int value);
virtual void GetBorders(int borders[4])
{
for(int i=0;i<4;i++)
{
borders[i]=this->Borders[i];
}
}
//@}
//@{
/**
* Set the gutter that should be left between the charts in the matrix.
*/
virtual void SetGutter(const vtkVector2f& gutter);
void SetGutterX(float value);
void SetGutterY(float value);
//@}
//@{
/**
* Set a specific resize that will move the bottom left point of a chart.
*/
virtual void SetSpecificResize(const vtkVector2i& index, const vtkVector2f& resize);
virtual void ClearSpecificResizes();
//@}
/**
* Get the gutter that should be left between the charts in the matrix.
*/
virtual vtkVector2f GetGutter() const { return this->Gutter; }
/**
* Allocate the charts, this will cause any null chart to be allocated.
*/
virtual void Allocate();
/**
* Set the chart element, note that the chart matrix must be large enough to
* accommodate the element being set. Note that this class will take ownership
* of the chart object.
* \return false if the element cannot be set.
*/
virtual bool SetChart(const vtkVector2i& position, vtkChart* chart);
/**
* Get the specified chart element, if the element does not exist NULL will be
* returned. If the chart element has not yet been allocated it will be at
* this point.
*/
virtual vtkChart* GetChart(const vtkVector2i& position);
/**
* Set the span of a chart in the matrix. This defaults to 1x1, and cannot
* exceed the remaining space in x or y.
* \return false If the span is not possible.
*/
virtual bool SetChartSpan(const vtkVector2i& position,
const vtkVector2i& span);
/**
* Get the span of the specified chart.
*/
virtual vtkVector2i GetChartSpan(const vtkVector2i& position);
/**
* Get the position of the chart in the matrix at the specified location.
* The position should be specified in scene coordinates.
*/
virtual vtkVector2i GetChartIndex(const vtkVector2f& position);
protected:
vtkChartMatrix();
~vtkChartMatrix();
class PIMPL;
PIMPL *Private;
// The number of charts in x and y.
vtkVector2i Size;
// The gutter between each chart.
vtkVector2f Gutter;
std::map<vtkVector2i, vtkVector2f> SpecificResize;
int Borders[4];
bool LayoutIsDirty;
private:
vtkChartMatrix(const vtkChartMatrix &) VTK_DELETE_FUNCTION;
void operator=(const vtkChartMatrix &) VTK_DELETE_FUNCTION;
};
#endif //vtkChartMatrix_h
|