VTK
dox/Charts/vtkChartPie.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkChartPie.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 __vtkChartPie_h
00027 #define __vtkChartPie_h
00028 
00029 #include "vtkChart.h"
00030 
00031 class vtkChartLegend;
00032 class vtkTooltipItem;
00033 class vtkChartPiePrivate;
00034 
00035 class VTK_CHARTS_EXPORT vtkChartPie : public vtkChart
00036 {
00037 public:
00038   vtkTypeMacro(vtkChartPie, vtkChart);
00039   virtual void PrintSelf(ostream &os, vtkIndent indent);
00040 
00042   static vtkChartPie *New();
00043 
00047   virtual void Update();
00048 
00051   virtual bool Paint(vtkContext2D *painter);
00052 
00054   virtual vtkPlot * AddPlot(int type);
00055 
00057 
00059   virtual vtkIdType AddPlot(vtkPlot* plot)
00060     { return Superclass::AddPlot(plot); }
00062 
00065   virtual vtkPlot* GetPlot(vtkIdType index);
00066 
00068   virtual vtkIdType GetNumberOfPlots();
00069 
00071   virtual void SetShowLegend(bool visible);
00072 
00075   virtual vtkChartLegend * GetLegend();
00076 
00079   virtual void SetScene(vtkContextScene *scene);
00080 
00081 //BTX
00083   virtual bool Hit(const vtkContextMouseEvent &mouse);
00084 
00086   virtual bool MouseEnterEvent(const vtkContextMouseEvent &mouse);
00087 
00089   virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse);
00090 
00092   virtual bool MouseLeaveEvent(const vtkContextMouseEvent &mouse);
00093 
00095   virtual bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse);
00096 
00098   virtual bool MouseButtonReleaseEvent(const vtkContextMouseEvent &mouse);
00099 
00101 
00103   virtual bool MouseWheelEvent(const vtkContextMouseEvent &mouse, int delta);
00104 //ETX
00106 
00107 //BTX
00108 protected:
00109   vtkChartPie();
00110   ~vtkChartPie();
00111 
00113   void RecalculatePlotTransforms();
00114 
00116   vtkChartLegend *Legend;
00117 
00120   vtkTooltipItem *Tooltip;
00121 
00123   bool PlotTransformValid;
00124 
00125 private:
00126   vtkChartPie(const vtkChartPie &); // Not implemented.
00127   void operator=(const vtkChartPie &);   // Not implemented.
00128 
00130   bool LocatePointInPlots(const vtkContextMouseEvent &mouse);
00131 
00133   vtkChartPiePrivate *Private;
00134 
00135 //ETX
00136 };
00137 
00138 #endif //__vtkChartPie_h