VTK
vtkChartPie.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkChartPie.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 
26 #ifndef vtkChartPie_h
27 #define vtkChartPie_h
28 
29 #include "vtkChartsCoreModule.h" // For export macro
30 #include "vtkChart.h"
31 
32 class vtkChartLegend;
33 class vtkTooltipItem;
34 class vtkChartPiePrivate;
35 
37 {
38 public:
39  vtkTypeMacro(vtkChartPie, vtkChart);
40  virtual void PrintSelf(ostream &os, vtkIndent indent);
41 
43  static vtkChartPie *New();
44 
48  virtual void Update();
49 
52  virtual bool Paint(vtkContext2D *painter);
53 
55  virtual vtkPlot * AddPlot(int type);
56 
58 
60  virtual vtkIdType AddPlot(vtkPlot* plot)
61  { return Superclass::AddPlot(plot); }
63 
66  virtual vtkPlot* GetPlot(vtkIdType index);
67 
69  virtual vtkIdType GetNumberOfPlots();
70 
72  virtual void SetShowLegend(bool visible);
73 
76  virtual vtkChartLegend * GetLegend();
77 
80  virtual void SetScene(vtkContextScene *scene);
81 
82 //BTX
84  virtual bool Hit(const vtkContextMouseEvent &mouse);
85 
87  virtual bool MouseEnterEvent(const vtkContextMouseEvent &mouse);
88 
90  virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse);
91 
93  virtual bool MouseLeaveEvent(const vtkContextMouseEvent &mouse);
94 
96  virtual bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse);
97 
99  virtual bool MouseButtonReleaseEvent(const vtkContextMouseEvent &mouse);
100 
102 
104  virtual bool MouseWheelEvent(const vtkContextMouseEvent &mouse, int delta);
105 //ETX
107 
108 //BTX
109 protected:
110  vtkChartPie();
111  ~vtkChartPie();
112 
114  void RecalculatePlotTransforms();
115 
118 
122 
125 
126 private:
127  vtkChartPie(const vtkChartPie &); // Not implemented.
128  void operator=(const vtkChartPie &); // Not implemented.
129 
131  bool LocatePointInPlots(const vtkContextMouseEvent &mouse);
132 
134  vtkChartPiePrivate *Private;
135 
136 //ETX
137 };
138 
139 #endif //vtkChartPie_h
bool PlotTransformValid
Definition: vtkChartPie.h:124
virtual void SetShowLegend(bool visible)
virtual bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse)
vtkChartLegend * Legend
Definition: vtkChartPie.h:117
virtual void PrintSelf(ostream &os, vtkIndent indent)
int vtkIdType
Definition: vtkType.h:275
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:56
Factory class for drawing 2D charts.
Definition: vtkChart.h:49
virtual void SetScene(vtkContextScene *scene)
virtual bool MouseWheelEvent(const vtkContextMouseEvent &mouse, int delta)
Provides a 2D scene for vtkContextItem objects.
data structure to represent mouse events.
virtual vtkChartLegend * GetLegend()
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual bool MouseButtonReleaseEvent(const vtkContextMouseEvent &mouse)
virtual vtkIdType GetNumberOfPlots()
Abstract class for 2D plots.
Definition: vtkPlot.h:51
virtual bool MouseEnterEvent(const vtkContextMouseEvent &mouse)
Factory class for drawing pie charts.
Definition: vtkChartPie.h:36
draw the chart legend
virtual bool Paint(vtkContext2D *painter)=0
virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse)
virtual bool Hit(const vtkContextMouseEvent &mouse)
virtual vtkPlot * GetPlot(vtkIdType index)
takes care of drawing 2D axes
vtkTooltipItem * Tooltip
Definition: vtkChartPie.h:121
static vtkObject * New()
virtual vtkIdType AddPlot(vtkPlot *plot)
Definition: vtkChartPie.h:60
virtual void Update()
virtual bool MouseLeaveEvent(const vtkContextMouseEvent &mouse)
virtual vtkPlot * AddPlot(int type)
#define VTKCHARTSCORE_EXPORT