10 FunctionGraphController(parentResponder, header, curveViewRange, &m_view, cursor, indexFunctionSelectedByCursor, modelVersion, rangeVersion, angleUnitVersion),
12 m_view(functionStore, curveViewRange, m_cursor, &m_bannerView, &m_cursorView),
13 m_graphRange(curveViewRange),
14 m_curveParameterController(curveViewRange, &m_bannerView, m_cursor, &m_view, this, functionStore),
15 m_functionStore(functionStore),
16 m_displayDerivativeInBanner(
false)
23 return I18n::Message::NoFunction;
25 return I18n::Message::NoActivatedFunction;
30 FunctionGraphController::viewWillAppear();
35 return m_displayDerivativeInBanner;
39 m_displayDerivativeInBanner = displayDerivative;
43 float characteristicRange = 0.0f;
49 characteristicRange = fRange > characteristicRange ? fRange : characteristicRange;
52 return (characteristicRange > 0.0f ? 1.6f*characteristicRange : 10.0f);
55 void GraphController::selectFunctionWithCursor(
int functionIndex) {
56 FunctionGraphController::selectFunctionWithCursor(functionIndex);
65 void GraphController::reloadBannerView() {
66 FunctionGraphController::reloadBannerView();
76 bool GraphController::moveCursorHorizontally(
int direction) {
82 void GraphController::initCursorParameters() {
83 double x = (interactiveCurveViewRange()->
xMin()+interactiveCurveViewRange()->
xMax())/2.0f;
84 selectFunctionWithCursor(0);
86 int functionIndex = 0;
100 CartesianFunctionStore * GraphController::functionStore()
const {
101 return m_functionStore;
104 GraphView * GraphController::functionGraphView() {
108 CurveParameterController * GraphController::curveParameterController() {
109 return &m_curveParameterController;
bool displayDerivativeInBanner() const
void setColor(KDColor color)
I18n::Message emptyMessage() override
float interestingXRange() override
static constexpr float k_numberOfCursorStepsInGradUnit
static constexpr float k_cursorBottomMarginRatio
void viewWillAppear() override
virtual Poincare::Context * localContext()
void setNumberOfSubviews(int numberOfSubviews)
Poincare::Expression * expression(Poincare::Context *context) const
static constexpr float k_cursorRightMarginRatio
void drawTangent(bool tangent)
bool privateMoveCursorHorizontally(Shared::CurveViewCursor *cursor, int direction, Shared::InteractiveCurveViewRange *range, int numberOfStepsInGradUnit, Shared::Function *function, Shared::TextFieldDelegateApp *app, float cursorTopMarginRatio, float cursorRightMarginRatio, float cursorBottomMarginRatio, float cursorLeftMarginRatio)
void setDisplayDerivativeInBanner(bool displayDerivative)
void moveTo(double x, double y)
void panToMakePointVisible(float x, float y, float topMarginRatio, float rightMarginRatio, float bottomMarginRation, float leftMarginRation)
int numberOfActiveFunctions()
void reloadDerivativeInBannerViewForCursorOnFunction(Shared::CurveViewCursor *cursor, CartesianFunction *function, Shared::TextFieldDelegateApp *app)
virtual float evaluateAtAbscissa(float x, Poincare::Context *context) const
int indexFunctionSelectedByCursor() const
int numberOfDefinedFunctions()
CartesianFunction * activeFunctionAtIndex(int i) override
static constexpr float k_cursorLeftMarginRatio
void setDelegate(InteractiveCurveViewRangeDelegate *delegate)
CurveViewCursor * m_cursor
static constexpr float k_cursorTopMarginRatio