[poincare] Change name: LayoutRef --> LayoutReference

This commit is contained in:
Émilie Feral
2018-09-14 16:43:27 +02:00
parent 467cc2b76f
commit 616e4c0bcc
186 changed files with 677 additions and 679 deletions

View File

@@ -150,16 +150,16 @@ void VariableBoxController::ContentViewController::willDisplayCellForIndex(Highl
if (!evaluation.isUninitialized()) {
/* TODO: implement list contexts */
// TODO: handle matrix and scalar!
LayoutRef layoutR = layoutRefForIndex(index);
LayoutReference layoutR = layoutRefForIndex(index);
const Matrix matrixEvaluation = static_cast<const Matrix&>(evaluation);
myCell->setLayoutRef(layoutR);
myCell->setLayoutReference(layoutR);
char buffer[2*PrintFloat::bufferSizeForFloatsWithPrecision(2)+1];
int numberOfChars = PrintFloat::convertFloatToText<float>(matrixEvaluation.numberOfRows(), buffer, PrintFloat::bufferSizeForFloatsWithPrecision(2), 2, Preferences::PrintFloatMode::Decimal);
buffer[numberOfChars++] = 'x';
PrintFloat::convertFloatToText<float>(matrixEvaluation.numberOfColumns(), buffer+numberOfChars, PrintFloat::bufferSizeForFloatsWithPrecision(2), 2, Preferences::PrintFloatMode::Decimal);
myCell->setSubtitle(buffer);
} else {
myCell->setLayoutRef(LayoutRef());
myCell->setLayoutReference(LayoutReference());
myCell->setSubtitle(I18n::translate(I18n::Message::Empty));
}
}
@@ -168,7 +168,7 @@ KDCoordinate VariableBoxController::ContentViewController::rowHeight(int index)
if (m_currentPage == Page::RootMenu || m_currentPage == Page::Scalar) {
return Metric::ToolboxRowHeight;
}
LayoutRef layoutR = layoutRefForIndex(index);
LayoutReference layoutR = layoutRefForIndex(index);
if (!layoutR.isUninitialized()) {
return max(layoutR.layoutSize().height()+k_leafMargin, Metric::ToolboxRowHeight);
}
@@ -198,7 +198,7 @@ void VariableBoxController::ContentViewController::viewDidDisappear() {
m_selectableTableView.deselectTable();
// Tidy the layouts used to display the VariableBoxController to clean TreePool
for (int i = 0; i < k_maxNumberOfDisplayedRows; i++) {
m_leafCells[i].setLayoutRef(LayoutRef());
m_leafCells[i].setLayoutReference(LayoutReference());
}
ViewController::viewDidDisappear();
}
@@ -258,17 +258,17 @@ const Expression VariableBoxController::ContentViewController::expressionForInde
return Expression();
}
LayoutRef VariableBoxController::ContentViewController::layoutRefForIndex(int index) {
LayoutReference VariableBoxController::ContentViewController::layoutRefForIndex(int index) {
if (m_currentPage == Page::Matrix) {
const Symbol symbol = Symbol::matrixSymbol('0'+(char)index);
return m_context->layoutForSymbol(symbol, Constant::ShortNumberOfSignificantDigits);
}
#if LIST_VARIABLES
if (m_currentPage == Page::List) {
return LayoutRef();
return LayoutReference();
}
#endif
return LayoutRef();
return LayoutReference();
}
VariableBoxController::VariableBoxController(GlobalContext * context) :