mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[escher] TableViewDataSource: implement default cumulatedWidthFromIndex,
cumulatedWidthFromIndex, indexFromCumulatedWidth, indexFromCumulatedHeight
This commit is contained in:
@@ -30,23 +30,6 @@ KDCoordinate ExpressionModelListController::expressionRowHeight(int j) {
|
||||
return modelSize + Metric::StoreRowHeight - KDText::charSize().height();
|
||||
}
|
||||
|
||||
KDCoordinate ExpressionModelListController::cumulatedExpressionHeightFromIndex(int j) {
|
||||
int result = 0;
|
||||
for (int k = 0; k < j; k++) {
|
||||
result += expressionRowHeight(k);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
int ExpressionModelListController::indexFromCumulatedExpressionHeight(KDCoordinate offsetY) {
|
||||
int result = 0;
|
||||
int j = 0;
|
||||
while (result < offsetY && j < numberOfExpressionRows()) {
|
||||
result += expressionRowHeight(j++);
|
||||
}
|
||||
return (result < offsetY || offsetY == 0) ? j : j - 1;
|
||||
}
|
||||
|
||||
void ExpressionModelListController::willDisplayExpressionCellAtIndex(HighlightCell * cell, int j) {
|
||||
EvenOddExpressionCell * myCell = (EvenOddExpressionCell *)cell;
|
||||
ExpressionModel * m = modelStore()->modelAtIndex(j);
|
||||
|
||||
Reference in New Issue
Block a user