class ThreeWayProgressBar : public Container
{
public:
ThreeWayProgressBar();
virtual ~ThreeWayProgressBar();
void reset();
void stopAnimation();
void setBarPercentage(int barIndex, int percentage);
void setActive(bool active);
void setButtonClickedCallback(touchgfx::GenericCallback<const ThreeWayProgressBar&>& callback)
{
buttonClickedAction = &callback;
}
private:
static const int NUMBER_OF_BARS = 3;
GenericCallback<const ThreeWayProgressBar&>* buttonClickedAction;
int radius;
Image background;
ButtonWithLabel centerButton;
MoveAnimator<ThreeWayProgressBarCircle> circles[NUMBER_OF_BARS];
Circle bars[NUMBER_OF_BARS];
#if !defined(USE_BPP) || USE_BPP==16
PainterRGB565Bitmap bitmapPainter;
#elif USE_BPP==24
PainterRGB888Bitmap bitmapPainter;
#elif USE_BPP==4
PainterGRAY4Bitmap bitmapPainter;
#elif USE_BPP==2
PainterGRAY2Bitmap bitmapPainter;
#else
#error Unknown USE_BPP
#endif
Callback<ThreeWayProgressBar, const AbstractButton& > buttonPressedCallback;
void buttonPressedHandler(const AbstractButton& button);
};