Files
Upsilon/apps/statistics/box_axis_view.h
Romain Goyet 2bf83c43a8 [apps/shared] Factorize CurveView::label
There was a lot of code duplication.
I removed the initialization of xLabel{} and yLabels{} because those are
scratch buffers that shouldn't be accessed before being written to
anyway.
2020-03-11 09:51:33 +01:00

28 lines
587 B
C++

#ifndef STATISTICS_BOX_AXIS_VIEW_H
#define STATISTICS_BOX_AXIS_VIEW_H
#include "box_range.h"
#include "store.h"
#include "../shared/labeled_curve_view.h"
#include "../constant.h"
#include <poincare/print_float.h>
namespace Statistics {
class BoxAxisView : public Shared::HorizontallyLabeledCurveView {
public:
BoxAxisView(Store * store) :
HorizontallyLabeledCurveView(&m_boxRange),
m_boxRange(BoxRange(store))
{}
void drawRect(KDContext * ctx, KDRect rect) const override;
private:
constexpr static KDCoordinate k_axisMargin = 3;
BoxRange m_boxRange;
};
}
#endif