[poincare] Change writeTextInBuffer signature (parameters are float

display mode and number of significant digits)
This commit is contained in:
Émilie Feral
2018-04-23 17:10:11 +02:00
parent b8af15f1ab
commit 2e7c08241a
118 changed files with 228 additions and 222 deletions

View File

@@ -1,9 +1,11 @@
#include "variable_box_controller.h"
#include "shared/poincare_helpers.h"
#include "constant.h"
#include <escher/metric.h>
#include <assert.h>
using namespace Poincare;
using namespace Shared;
/* ContentViewController */
@@ -140,7 +142,7 @@ void VariableBoxController::ContentViewController::willDisplayCellForIndex(Highl
if (m_currentPage == Page::Scalar) {
myCell->displayExpression(false);
char buffer[PrintFloat::k_maxComplexBufferLength];
evaluation->writeTextInBuffer(buffer, PrintFloat::k_maxComplexBufferLength, Constant::ShortNumberOfSignificantDigits);
PoincareHelpers::WriteTextInBuffer(evaluation, buffer, PrintFloat::k_maxComplexBufferLength, Constant::ShortNumberOfSignificantDigits);
myCell->setSubtitle(buffer);
return;
}
@@ -255,7 +257,7 @@ const Expression * VariableBoxController::ContentViewController::expressionForIn
ExpressionLayout * VariableBoxController::ContentViewController::expressionLayoutForIndex(int index) {
if (m_currentPage == Page::Matrix) {
const Symbol symbol = Symbol::matrixSymbol('0'+(char)index);
return m_context->expressionLayoutForSymbol(&symbol, Constant::LargeNumberOfSignificantDigits);
return m_context->expressionLayoutForSymbol(&symbol, Constant::ShortNumberOfSignificantDigits);
}
#if LIST_VARIABLES
if (m_currentPage == Page::List) {