[apps/graph] ValuesController: column width are different for parametric

functions
This commit is contained in:
Émilie Feral
2019-09-24 17:32:42 +02:00
committed by LeaNumworks
parent bf23e0f8da
commit 00bb1b7ac1
6 changed files with 49 additions and 29 deletions

View File

@@ -31,6 +31,30 @@ ValuesController::ValuesController(Responder * parentResponder, InputEventHandle
setupAbscissaCellsAndTitleCells(inputEventHandlerDelegate);
}
KDCoordinate ValuesController::columnWidth(int i) {
switch (i) {
case 0:
return k_abscissaCellWidth;
default:
return k_ordinateCellWidth;
}
}
KDCoordinate ValuesController::cumulatedWidthFromIndex(int i) {
if (i == 0) {
return 0;
} else {
return k_abscissaCellWidth + (i-1)*k_ordinateCellWidth;
}
}
int ValuesController::indexFromCumulatedWidth(KDCoordinate offsetX) {
if (offsetX <= k_abscissaCellWidth) {
return 0;
}
return (offsetX - k_abscissaCellWidth)/k_ordinateCellWidth+1;
}
void ValuesController::willDisplayCellAtLocation(HighlightCell * cell, int i, int j) {
Shared::ValuesController::willDisplayCellAtLocation(cell, i, j);
if (typeAtLocation(i,j) == k_abscissaTitleCellType) {