from PieChart.hpp:56
class PieChart : public Container
{
public:
PieChart();
void setSlices(int newShares[NUM_ITEMS]);
#if !defined(USE_BPP) || USE_BPP==16
void setPainter(int index, AbstractPainterRGB565& painter);
#elif USE_BPP==24
void setPainter(int index, AbstractPainterRGB888& painter);
#elif USE_BPP==4
void setPainter(int index, AbstractPainterGRAY4& painter);
#elif USE_BPP==2
void setPainter(int index, AbstractPainterGRAY2& painter);
#else
#error Unknown USE_BPP
#endif
void setRadiuses(int innerRadius, int outerRadius);
void setAngles(int newMinAngle, int newMaxAngle);
void setPieChart(int newStartAngle, int newEndAngle, int newMinRadius, int newMaxRadius);
void startPieChartAnimation(int toStartAngle, int toEndAngle, int toMinRadius, int toMaxRadius, int steps, EasingEquation newAngleEquation = &EasingEquations::linearEaseNone, EasingEquation newRadiusEquation = &EasingEquations::linearEaseNone);
void getAngles(int& currentMinAngle, int& currentMaxAngle) const;
void setCenter(int newCenterX, int newCenterY);
void setSelectAnimationSteps(int steps);
void recalculatePieChart();
void animateSelected(int steps, EasingEquation progressionEquation = &EasingEquations::linearEaseNone);
void setSelected(int slice, bool value);
bool isSelected(int slice) const;
void unselectAll();
void setPieChartSelectionCallback(GenericCallback<const PieChart&, int>& callback);
void setPieChartAnimationEndedCallback(GenericCallback<const PieChart&>& callback);
void activatePieChartAnimationEndedCallback(bool active);
virtual void setWidth(int16_t width);
virtual void setHeight(int16_t height);
virtual void handleClickEvent(const ClickEvent& evt);
virtual void handleTickEvent();
private:
int slice[NUM_ITEMS];
int sliceSum;
Circle circle[NUM_ITEMS];
int displacement[NUM_ITEMS];
int minRadius, maxRadius;
int minAngle, maxAngle;
int centerX, centerY;
bool animationRunning;
int expand[NUM_ITEMS];
bool selected[NUM_ITEMS];
int selectAnimationSteps;
enum
{
CHANGE_PIECHART,
SELECT_DESELECT
};
int animationType;
int startAngleInit, startAngleExit;
int endAngleInit, endAngleExit;
int minRadiusInit, minRadiusExit;
int maxRadiusInit, maxRadiusExit;
int currentStep;
int animationSteps;
EasingEquation angleEquation;
EasingEquation radiusEquation;
GenericCallback<const PieChart&, int>* selectionAction;
GenericCallback<const PieChart&>* animationEndedAction;
bool animationEndedCallbackActive;
};