[escher] Reorganize all cells'name and factorize their layouts

Change-Id: I69900ee98ff6a6868f96d70a0e335a589ef16c3f
This commit is contained in:
Émilie Feral
2017-02-17 10:56:21 +01:00
parent 4a1735c29e
commit 2e16365100
149 changed files with 903 additions and 914 deletions

View File

@@ -8,9 +8,9 @@ ListParameterController::ListParameterController(Responder * parentResponder, Fu
m_selectableTableView(SelectableTableView(this, this, Metric::TopMargin, Metric::RightMargin,
Metric::BottomMargin, Metric::LeftMargin)),
m_functionStore(functionStore),
m_colorCell(ChevronMenuListCell((char*)"Couleur de la fonction")),
m_enableCell(SwitchMenuListCell((char*)"Activer/Desactiver")),
m_deleteCell(MenuListCell((char*)"Supprimer la fonction"))
m_colorCell(PointerTableCellWithChevron((char*)"Couleur de la fonction")),
m_enableCell(PointerTableCellWithSwitch((char*)"Activer/Desactiver")),
m_deleteCell(PointerTableCell((char*)"Supprimer la fonction"))
{
}
@@ -32,7 +32,7 @@ void ListParameterController::didBecomeFirstResponder() {
app()->setFirstResponder(&m_selectableTableView);
}
void ListParameterController::willDisplayCellForIndex(TableViewCell * cell, int index) {
void ListParameterController::willDisplayCellForIndex(HighlightCell * cell, int index) {
if (cell == &m_enableCell) {
SwitchView * switchView = (SwitchView *)m_enableCell.accessoryView();
switchView->setState(m_function->isActive());
@@ -83,10 +83,10 @@ int ListParameterController::numberOfRows() {
return k_totalNumberOfCell;
};
TableViewCell * ListParameterController::reusableCell(int index) {
HighlightCell * ListParameterController::reusableCell(int index) {
assert(index >= 0);
assert(index < k_totalNumberOfCell);
TableViewCell * cells[] = {&m_colorCell, &m_enableCell, &m_deleteCell};
HighlightCell * cells[] = {&m_colorCell, &m_enableCell, &m_deleteCell};
return cells[index];
}