Files
Upsilon/apps/statistics/box_axis_view.h
Léa Saviot 6e9021ed35 [apps/stats] Fix display one axis only in Box tab
The axis view is now a separate view, so there is no problem of
computing the height of the "axed" box view.
2018-05-29 15:34:49 +02:00

30 lines
713 B
C++

#ifndef STATISTICS_BOX_AXIS_VIEW_H
#define STATISTICS_BOX_AXIS_VIEW_H
#include "box_range.h"
#include "store.h"
#include "../shared/curve_view.h"
#include "../constant.h"
namespace Statistics {
class BoxAxisView : public Shared::CurveView {
public:
BoxAxisView(Store * store) :
CurveView(&m_boxRange),
m_labels{},
m_boxRange(BoxRange(store))
{}
void drawRect(KDContext * ctx, KDRect rect) const override;
private:
constexpr static KDCoordinate k_axisMargin = 3;
char * label(Axis axis, int index) const override;
char m_labels[k_maxNumberOfXLabels][Poincare::PrintFloat::bufferSizeForFloatsWithPrecision(Constant::ShortNumberOfSignificantDigits)];
BoxRange m_boxRange;
};
}
#endif