[escher] Change dynamic view controller paradigm

Change-Id: I57fd41c9b9ad8a1e8b684b97fdf80ddffd71881d
This commit is contained in:
Émilie Feral
2017-05-03 10:26:44 +02:00
parent a1f3c21d9b
commit 70fc734f7b
61 changed files with 338 additions and 475 deletions

View File

@@ -16,13 +16,6 @@ int GoToParameterController::numberOfRows() {
return 2;
}
void GoToParameterController::unloadView() {
assert(m_abscisseCell != nullptr);
delete m_abscisseCell;
m_abscisseCell = nullptr;
FloatParameterController::unloadView();
}
HighlightCell * GoToParameterController::reusableParameterCell(int index, int type) {
assert(index == 0);
return m_abscisseCell;
@@ -40,11 +33,16 @@ void GoToParameterController::buttonAction() {
stack->pop();
}
View * GoToParameterController::createView() {
SelectableTableView * tableView = (SelectableTableView *)FloatParameterController::createView();
assert(m_abscisseCell == nullptr);
View * GoToParameterController::loadView() {
SelectableTableView * tableView = (SelectableTableView *)FloatParameterController::loadView();
m_abscisseCell = new MessageTableCellWithEditableText(tableView, this, m_draftTextBuffer, m_abscissaSymbol);
return tableView;
}
void GoToParameterController::unloadView(View * view) {
delete m_abscisseCell;
m_abscisseCell = nullptr;
FloatParameterController::unloadView(view);
}
}