Files
Upsilon/apps/shared/function_graph_view.h
Émilie Feral 7ea0dbeb56 [apps] Shared: Move part of the implementation of TermSumController to
shared (Integral Graph Controller) and improve bound edition in
TermSumController.
2018-01-30 18:19:27 +01:00

41 lines
1.3 KiB
C++

#ifndef SHARED_FUNCTION_GRAPH_VIEW_H
#define SHARED_FUNCTION_GRAPH_VIEW_H
#include <escher.h>
#include "curve_view.h"
#include "function.h"
#include "../constant.h"
#include "interactive_curve_view_range.h"
namespace Shared {
class FunctionGraphView : public CurveView {
public:
FunctionGraphView(InteractiveCurveViewRange * graphRange, CurveViewCursor * cursor,
BannerView * bannerView, View * cursorView);
void reload() override;
void drawRect(KDContext * ctx, KDRect rect) const override;
void setContext(Poincare::Context * context);
Poincare::Context * context() const;
void selectFunction(Function * function);
void setVerticalCursor(bool verticalCursor);
void setAreaHighlight(float start, float end);
void setAreaHighlightColor(bool highlightColor);
protected:
Function * m_selectedFunction;
bool m_verticalCursor;
float m_highlightedStart;
float m_highlightedEnd;
bool m_shouldColorHighlighted;
private:
KDSize cursorSize() override;
char * label(Axis axis, int index) const override;
char m_xLabels[k_maxNumberOfXLabels][Poincare::PrintFloat::bufferSizeForFloatsWithPrecision(Constant::ShortNumberOfSignificantDigits)];
char m_yLabels[k_maxNumberOfYLabels][Poincare::PrintFloat::bufferSizeForFloatsWithPrecision(Constant::ShortNumberOfSignificantDigits)];
Poincare::Context * m_context;
};
}
#endif