00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkChartParallelCoordinates.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00015 00026 #ifndef __vtkChartParallelCoordinates_h 00027 #define __vtkChartParallelCoordinates_h 00028 00029 #include "vtkChart.h" 00030 00031 class vtkIdTypeArray; 00032 class vtkStringArray; 00033 00034 class VTK_CHARTS_EXPORT vtkChartParallelCoordinates : public vtkChart 00035 { 00036 public: 00037 vtkTypeMacro(vtkChartParallelCoordinates, vtkChart); 00038 virtual void PrintSelf(ostream &os, vtkIndent indent); 00039 00041 static vtkChartParallelCoordinates* New(); 00042 00046 virtual void Update(); 00047 00050 virtual bool Paint(vtkContext2D *painter); 00051 00053 void SetColumnVisibility(const char* name, bool visible); 00054 00056 bool GetColumnVisibility(const char* name); 00057 00059 00060 vtkGetObjectMacro(VisibleColumns, vtkStringArray); 00062 00064 virtual vtkPlot* AddPlot(int type); 00065 00068 virtual bool RemovePlot(vtkIdType index); 00069 00071 virtual void ClearPlots(); 00072 00075 virtual vtkPlot* GetPlot(vtkIdType index); 00076 00078 virtual vtkIdType GetNumberOfPlots(); 00079 00081 virtual vtkAxis* GetAxis(int axisIndex); 00082 00084 virtual vtkIdType GetNumberOfAxes(); 00085 00089 virtual void RecalculateBounds(); 00090 00091 //BTX 00093 virtual bool Hit(const vtkContextMouseEvent &mouse); 00094 00096 virtual bool MouseEnterEvent(const vtkContextMouseEvent &mouse); 00097 00099 virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse); 00100 00102 virtual bool MouseLeaveEvent(const vtkContextMouseEvent &mouse); 00103 00105 virtual bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse); 00106 00108 virtual bool MouseButtonReleaseEvent(const vtkContextMouseEvent &mouse); 00109 00112 virtual bool MouseWheelEvent(const vtkContextMouseEvent &mouse, int delta); 00113 //ETX 00114 00115 //BTX 00116 protected: 00117 vtkChartParallelCoordinates(); 00118 ~vtkChartParallelCoordinates(); 00119 00121 00122 class Private; 00123 Private *Storage; 00125 00126 bool GeometryValid; 00127 00129 vtkIdTypeArray *Selection; 00130 00132 vtkStringArray *VisibleColumns; 00133 00135 vtkTimeStamp BuildTime; 00136 00137 void ResetSelection(); 00138 void UpdateGeometry(); 00139 void CalculatePlotTransform(); 00140 00141 private: 00142 vtkChartParallelCoordinates(const vtkChartParallelCoordinates &); // Not implemented. 00143 void operator=(const vtkChartParallelCoordinates &); // Not implemented. 00144 //ETX 00145 }; 00146 00147 #endif //__vtkChartParallelCoordinates_h