6663b6c9
adorian
projet complet av...
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
#include <escher/simple_table_view_data_source.h>
#include <escher/metric.h>
extern "C" {
#include <assert.h>
}
KDCoordinate SimpleTableViewDataSource::columnWidth(int i) {
return cellWidth();
}
KDCoordinate SimpleTableViewDataSource::rowHeight(int j) {
return cellHeight();
}
KDCoordinate SimpleTableViewDataSource::cumulatedWidthFromIndex(int i) {
return cellWidth() * i;
}
KDCoordinate SimpleTableViewDataSource::cumulatedHeightFromIndex(int j) {
return cellHeight() * j;
}
int SimpleTableViewDataSource::indexFromCumulatedWidth(KDCoordinate offsetX) {
KDCoordinate width = cellWidth();
if (width == 0) {
return 0;
}
return (offsetX - 1) / width;
}
int SimpleTableViewDataSource::indexFromCumulatedHeight(KDCoordinate offsetY) {
KDCoordinate height = cellHeight();
if (height == 0) {
return 0;
}
return (offsetY - 1) / height;
}
HighlightCell * SimpleTableViewDataSource::reusableCell(int index, int type) {
assert(type == 0);
return reusableCell(index);
}
int SimpleTableViewDataSource::reusableCellCount(int type) {
assert(type == 0);
return reusableCellCount();
}
int SimpleTableViewDataSource::typeAtLocation(int i, int j) {
return 0;
}
|