mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-22 15:20:39 +01:00
[escher] Change dynamic view controller paradigm
Change-Id: I57fd41c9b9ad8a1e8b684b97fdf80ddffd71881d
This commit is contained in:
@@ -36,18 +36,6 @@ KDCoordinate ListController::rowHeight(int j) {
|
||||
return functionSize + k_emptyRowHeight - KDText::stringSize(" ").height();
|
||||
}
|
||||
|
||||
void ListController::unloadView() {
|
||||
for (int i = 0; i < k_maxNumberOfRows; i++) {
|
||||
assert(m_functionTitleCells[i] != nullptr);
|
||||
delete m_functionTitleCells[i];
|
||||
m_functionTitleCells[i] = nullptr;
|
||||
assert(m_expressionCells[i] != nullptr);
|
||||
delete m_expressionCells[i];
|
||||
m_expressionCells[i] = nullptr;
|
||||
}
|
||||
Shared::ListController::unloadView();
|
||||
}
|
||||
|
||||
void ListController::editExpression(Function * function, Ion::Events::Event event) {
|
||||
char * initialText = nullptr;
|
||||
char initialTextContent[TextField::maxBufferSize()];
|
||||
@@ -111,14 +99,22 @@ void ListController::removeFunctionRow(Function * function) {
|
||||
}
|
||||
}
|
||||
|
||||
View * ListController::createView() {
|
||||
View * ListController::loadView() {
|
||||
for (int i = 0; i < k_maxNumberOfRows; i++) {
|
||||
assert(m_functionTitleCells[i] == nullptr);
|
||||
m_functionTitleCells[i] = new FunctionTitleCell(FunctionTitleCell::Orientation::VerticalIndicator);
|
||||
assert(m_expressionCells[i] == nullptr);
|
||||
m_expressionCells[i] = new FunctionExpressionCell();
|
||||
}
|
||||
return Shared::ListController::createView();
|
||||
return Shared::ListController::loadView();
|
||||
}
|
||||
|
||||
void ListController::unloadView(View * view) {
|
||||
for (int i = 0; i < k_maxNumberOfRows; i++) {
|
||||
delete m_functionTitleCells[i];
|
||||
m_functionTitleCells[i] = nullptr;
|
||||
delete m_expressionCells[i];
|
||||
m_expressionCells[i] = nullptr;
|
||||
}
|
||||
Shared::ListController::unloadView(view);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user