mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-26 17:20:53 +01:00
[calculation] Additional outputs: display left and center subviews of
InputExactApproximateExpressionsView in the additional output pop-up
This commit is contained in:
@@ -30,6 +30,7 @@ IllustratedListController::IllustratedListController(Responder * parentResponder
|
||||
{
|
||||
for (int i = 0; i < k_maxNumberOfAdditionalCalculations; i++) {
|
||||
m_additionalCalculationCells[i].setParentResponder(m_listController.selectableTableView());
|
||||
m_additionalCalculationCells[i].setDisplayLeft(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,8 +84,11 @@ void IllustratedListController::willDisplayCellForIndex(HighlightCell * cell, in
|
||||
// TODO ?
|
||||
return;
|
||||
}
|
||||
Poincare::Context * context = App::app()->localContext();
|
||||
ScrollableInputExactApproximateExpressionsCell * myCell = (ScrollableInputExactApproximateExpressionsCell *)cell;
|
||||
myCell->setCalculation(m_calculationStore.calculationAtIndex(index-1).pointer());
|
||||
Calculation * c = m_calculationStore.calculationAtIndex(index-1).pointer();
|
||||
myCell->setCalculation(c);
|
||||
myCell->setDisplayCenter(c->displayOutput(context) != Calculation::DisplayOutput::ApproximateOnly);
|
||||
//myCell->setHighlighted(myCell->isHighlighted()); //TODO??
|
||||
}
|
||||
|
||||
|
||||
@@ -37,6 +37,8 @@ public:
|
||||
ScrollableInputExactApproximateExpressionsCell() : m_view(nullptr) {}
|
||||
void setParentResponder(Responder * r) { m_view.setParentResponder(r); }
|
||||
void setCalculation(Calculation * calculation) { m_view.setCalculation(calculation); }
|
||||
void setDisplayCenter(bool display) { m_view.setDisplayCenter(display); }
|
||||
void setDisplayLeft(bool display) { m_view.setDisplayLeft(display); }
|
||||
private:
|
||||
int numberOfSubviews() const override { return 1; }
|
||||
View * subviewAtIndex(int index) override { return &m_view; }
|
||||
|
||||
Reference in New Issue
Block a user