mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/graph] ValuesController: column width are different for parametric
functions
This commit is contained in:
committed by
LeaNumworks
parent
bf23e0f8da
commit
00bb1b7ac1
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user