VTK
vtkChartBox.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkChartBox.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 
27 #ifndef vtkChartBox_h
28 #define vtkChartBox_h
29 
30 #include "vtkChartsCoreModule.h" // For export macro
31 #include "vtkChart.h"
32 
33 class vtkIdTypeArray;
34 class vtkPlotBox;
35 class vtkStdString;
36 class vtkStringArray;
37 class vtkTooltipItem;
38 
39 class VTKCHARTSCORE_EXPORT vtkChartBox : public vtkChart
40 {
41 public:
42  vtkTypeMacro(vtkChartBox, vtkChart);
43  virtual void PrintSelf(ostream &os, vtkIndent indent);
44 
48  static vtkChartBox* New();
49 
55  virtual void Update();
56 
60  virtual bool Paint(vtkContext2D *painter);
61 
63 
66  void SetColumnVisibility(const vtkStdString& name, bool visible);
67  void SetColumnVisibility(vtkIdType column, bool visible);
69 
74  void SetColumnVisibilityAll(bool visible);
75 
77 
83 
88 
90 
93  vtkGetObjectMacro(VisibleColumns, vtkStringArray);
95 
96  // Index of the selected column in the visible columns list.
97  vtkGetMacro(SelectedColumn, int);
98  vtkSetMacro(SelectedColumn, int);
99 
104 
109 
113  virtual vtkAxis* GetYAxis();
114 
118  virtual float GetXPosition(int index);
119 
124 
129  virtual void SetPlot(vtkPlotBox *plot);
130 
134  virtual bool Hit(const vtkContextMouseEvent &mouse);
135 
139  virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse);
140 
144  virtual bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse);
145 
149  virtual bool MouseButtonReleaseEvent(const vtkContextMouseEvent &mouse);
150 
154  virtual void SetTooltip(vtkTooltipItem *tooltip);
155 
160 
164  virtual void SetTooltipInfo(const vtkContextMouseEvent &,
165  const vtkVector2d &,
166  vtkIdType, vtkPlot*,
167  vtkIdType segmentIndex = -1);
168 
169 protected:
172 
174 
177  class Private;
178  Private *Storage;
180 
182 
187 
192 
194 
200 
205 
210 
214  void SwapAxes(int a1, int a2);
215 
222  int invokeEvent = -1);
223 
225  const vtkVector2f &tolerance, vtkVector2f &plotPos,
226  vtkPlot *plot, vtkIdType &segmentIndex);
227 
228 private:
229  vtkChartBox(const vtkChartBox &) VTK_DELETE_FUNCTION;
230  void operator=(const vtkChartBox &) VTK_DELETE_FUNCTION;
231 
232 };
233 
235 
241 {
245  int Index;
246 };
248 
249 #endif //vtkChartBox_h
vtkChart
Factory class for drawing 2D charts.
Definition: vtkChart.h:51
vtkChartBox::GetNumberOfPlots
virtual vtkIdType GetNumberOfPlots()
Get the number of plots the chart contains.
vtkChartBox::LocatePointInPlot
int LocatePointInPlot(const vtkVector2f &position, const vtkVector2f &tolerance, vtkVector2f &plotPos, vtkPlot *plot, vtkIdType &segmentIndex)
vtkContextMouseEvent
data structure to represent mouse events.
Definition: vtkContextMouseEvent.h:41
vtkChartBox::MouseMoveEvent
virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse)
Mouse move event.
vtkChartBox::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkChartBox::SwapAxes
void SwapAxes(int a1, int a2)
vtkChartBox::Update
virtual void Update()
Perform any updates to the item that may be necessary before rendering.
vtkIdType
int vtkIdType
Definition: vtkType.h:287
vtkChartBoxData::Position
vtkVector2f Position
Definition: vtkChartBox.h:243
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:36
vtkChartBox::VisibleColumns
vtkStringArray * VisibleColumns
A list of the visible columns in the chart.
Definition: vtkChartBox.h:191
vtkChartBox::GetTooltip
virtual vtkTooltipItem * GetTooltip()
Get the vtkTooltipItem object that will be displayed by the chart.
vtkChart.h
vtkChartBox::SetColumnVisibility
void SetColumnVisibility(const vtkStdString &name, bool visible)
Set the visibility of the specified column.
vtkChartBox::Hit
virtual bool Hit(const vtkContextMouseEvent &mouse)
Return true if the supplied x, y coordinate is inside the item.
vtkChartBox
Factory class for drawing box plot charts.
Definition: vtkChartBox.h:40
vtkChartBox::GetColumnVisibility
bool GetColumnVisibility(const vtkStdString &name)
Get the visibility of the specified column.
vtkSmartPointer< vtkTooltipItem >
vtkChartBoxData::SeriesName
vtkStdString SeriesName
Definition: vtkChartBox.h:242
vtkTooltipItem
takes care of drawing 2D axes
Definition: vtkTooltipItem.h:40
vtkContext2D
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:58
vtkPlot
Abstract class for 2D plots.
Definition: vtkPlot.h:53
vtkChartBox::ResetSelection
void ResetSelection()
vtkChartBox::GetNumberOfVisibleColumns
virtual vtkIdType GetNumberOfVisibleColumns()
Get the number of visible box plots in the current chart.
vtkVector2d
Definition: vtkVector.h:347
vtkX3D::position
@ position
Definition: vtkX3D.h:261
vtkChartBox::GetPlot
virtual vtkPlot * GetPlot(vtkIdType index)
Get the plot at the specified index, returns null if the index is invalid.
vtkPlotBox
Class for drawing box plots.
Definition: vtkPlotBox.h:42
vtkChartBox::Paint
virtual bool Paint(vtkContext2D *painter)
Paint event for the chart, called whenever the chart needs to be drawn.
vtkChartBox::SetTooltip
virtual void SetTooltip(vtkTooltipItem *tooltip)
Set the vtkTooltipItem object that will be displayed by the chart.
vtkChartBox::LocatePointInPlots
bool LocatePointInPlots(const vtkContextMouseEvent &mouse, int invokeEvent=-1)
Try to locate a point within the plots to display in a tooltip.
vtkChartBox::GeometryValid
bool GeometryValid
Definition: vtkChartBox.h:181
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkChartBox::vtkChartBox
vtkChartBox()
vtkChartBox::MouseButtonPressEvent
virtual bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse)
Mouse button down event.
vtkChartBox::GetYAxis
virtual vtkAxis * GetYAxis()
Get the chart Y axis.
vtkChartBox::BuildTime
vtkTimeStamp BuildTime
The point cache is marked dirty until it has been initialized.
Definition: vtkChartBox.h:204
vtkChartBox::SetColumnVisibilityAll
void SetColumnVisibilityAll(bool visible)
Set the visibility of all columns (true will make them all visible, false will remove all visible col...
vtkChartBox::GetColumnVisibility
bool GetColumnVisibility(vtkIdType column)
vtkChartBox::GetColumnId
vtkIdType GetColumnId(const vtkStdString &name)
Get the input table column id of a column by its name.
vtkChartBox::SelectedColumn
int SelectedColumn
Index of the selected column in the visible columns list.
Definition: vtkChartBox.h:197
vtkChartBox::SetTooltipInfo
virtual void SetTooltipInfo(const vtkContextMouseEvent &, const vtkVector2d &, vtkIdType, vtkPlot *, vtkIdType segmentIndex=-1)
Set the information passed to the tooltip.
vtkChartBox::SelectedColumnDelta
float SelectedColumnDelta
Definition: vtkChartBox.h:198
vtkX3D::name
@ name
Definition: vtkX3D.h:219
vtkChartBox::SetPlot
virtual void SetPlot(vtkPlotBox *plot)
Set plot to use for the chart.
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkChartBoxData::ScreenPosition
vtkVector2i ScreenPosition
Definition: vtkChartBox.h:244
vtkIdTypeArray
dynamic, self-adjusting array of vtkIdType
Definition: vtkIdTypeArray.h:42
vtkChartBox::Tooltip
vtkSmartPointer< vtkTooltipItem > Tooltip
The tooltip item for the chart - can be used to display extra information.
Definition: vtkChartBox.h:209
vtkChartBox::MouseButtonReleaseEvent
virtual bool MouseButtonReleaseEvent(const vtkContextMouseEvent &mouse)
Mouse button release event.
vtkChartBoxData
Small struct used by InvokeEvent to send some information about the point that was clicked on.
Definition: vtkChartBox.h:241
vtkAxis
takes care of drawing 2D axes
Definition: vtkAxis.h:72
vtkChartBox::GetXPosition
virtual float GetXPosition(int index)
Get the column X position by index in the visible set.
vtkChartBox::Storage
Private * Storage
Definition: vtkChartBox.h:177
vtkStringArray
a vtkAbstractArray subclass for strings
Definition: vtkStringArray.h:43
vtkChartBoxData::Index
int Index
Definition: vtkChartBox.h:245
vtkChartBox::SetColumnVisibility
void SetColumnVisibility(vtkIdType column, bool visible)
vtkVector2i
Some derived classes for the different vectors commonly used.
Definition: vtkVector.h:328
vtkStdString
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:49
vtkChartBox::UpdateGeometry
void UpdateGeometry(vtkContext2D *)
vtkX3D::index
@ index
Definition: vtkX3D.h:246
vtkChartBox::New
static vtkChartBox * New()
Creates a parallel coordinates chart.
vtkVector2f
Definition: vtkVector.h:338
vtkChartBox::~vtkChartBox
~vtkChartBox()
vtkChartBox::Selection
vtkIdTypeArray * Selection
Selected indices for the table the plot is rendering.
Definition: vtkChartBox.h:186
vtkChartBox::CalculatePlotTransform
void CalculatePlotTransform()