Files
Upsilon/apps/zoom_parameter_controller.h
Émilie Feral affda5eae9 [apps] Modular reimplementation of application models (stores and
ranges) and of curve views/curve view controllers.

Change-Id: If4ca9bf1bec024917ef540a3fc7baefa8700f7ba
2017-01-10 13:35:19 +01:00

46 lines
1.5 KiB
C++

#ifndef APPS_ZOOM_PARAMETER_CONTROLLER_H
#define APPS_ZOOM_PARAMETER_CONTROLLER_H
#include <escher.h>
#include "interactive_curve_view_range.h"
#include "curve_view.h"
class ZoomParameterController : public ViewController {
public:
ZoomParameterController(Responder * parentResponder, InteractiveCurveViewRange * interactiveCurveViewRange, CurveView * curveView);
const char * title() const override;
View * view() override;
bool handleEvent(Ion::Events::Event event) override;
void didBecomeFirstResponder() override;
private:
class ContentView : public View {
public:
ContentView(CurveView * curveView);
void layoutSubviews() override;
CurveView * curveView();
private:
class LegendView : public View {
public:
LegendView();
void drawRect(KDContext * ctx, KDRect rect) const override;
private:
constexpr static KDColor k_legendBackgroundColor = KDColor::RGB24(0xECECEC);
constexpr static int k_numberOfLegends = 6;
constexpr static KDCoordinate k_tokenWidth = 30;
void layoutSubviews() override;
int numberOfSubviews() const override;
View * subviewAtIndex(int index) override;
PointerTextView m_legends[k_numberOfLegends];
};
int numberOfSubviews() const override;
View * subviewAtIndex(int index) override;
CurveView * m_curveView;
LegendView m_legendView;
constexpr static KDCoordinate k_legendHeight = 50;
};
ContentView m_contentView;
InteractiveCurveViewRange * m_interactiveRange;
};
#endif