[apps] Enable to specialize the sum layout in Sum Graph Controller

This commit is contained in:
Émilie Feral
2018-01-10 15:59:08 +01:00
committed by EmilieNumworks
parent e5032b8c30
commit ac6c8379ed
6 changed files with 24 additions and 8 deletions

View File

@@ -1,5 +1,6 @@
#include "integral_graph_controller.h"
#include "../../shared/text_field_delegate.h"
#include "../../../poincare/src/layout/string_layout.h"
#include "../app.h"
#include <assert.h>
@@ -35,4 +36,10 @@ double IntegralGraphController::cursorNextStep(double x, int direction) {
return (direction > 0 ? x + m_graphRange->xGridUnit()/k_numberOfCursorStepsInGradUnit : x - m_graphRange->xGridUnit()/k_numberOfCursorStepsInGradUnit);
}
ExpressionLayout * IntegralGraphController::createFunctionLayout(const char * functionName) {
char buffer[7] = "0(x)dx";
buffer[0] = functionName[0];
return new StringLayout(buffer, strlen(buffer), KDText::FontSize::Small);
}
}