Numworks Epsilon  1.4.1
Graphing Calculator Operating System
simple_table_view_data_source.cpp
Go to the documentation of this file.
2 #include <escher/metric.h>
3 
4 extern "C" {
5 #include <assert.h>
6 }
7 
9  return cellWidth();
10 }
11 
13  return cellHeight();
14 }
15 
17  return cellWidth() * i;
18 }
19 
21  return cellHeight() * j;
22 }
23 
25  KDCoordinate width = cellWidth();
26  if (width == 0) {
27  return 0;
28  }
29  return (offsetX - 1) / width;
30 }
31 
33  KDCoordinate height = cellHeight();
34  if (height == 0) {
35  return 0;
36  }
37  return (offsetY - 1) / height;
38 }
39 
41  assert(type == 0);
42  return reusableCell(index);
43 }
44 
46  assert(type == 0);
47  return reusableCellCount();
48 }
49 
51  return 0;
52 }
int typeAtLocation(int i, int j) override
KDCoordinate cumulatedWidthFromIndex(int i) override
virtual int reusableCellCount()=0
#define assert(e)
Definition: assert.h:9
int16_t KDCoordinate
Definition: coordinate.h:6
virtual KDCoordinate cellHeight()=0
virtual KDCoordinate cellWidth()=0
int indexFromCumulatedWidth(KDCoordinate offsetX) override
KDCoordinate cumulatedHeightFromIndex(int j) override
int indexFromCumulatedHeight(KDCoordinate offsetY) override
KDCoordinate columnWidth(int i) override
KDCoordinate rowHeight(int j) override
virtual HighlightCell * reusableCell(int index)=0