32 virtual void show()=0;
33 virtual double width()
const=0;
34 virtual double height()
const=0;
49 virtual ~Grid()=
default;
51 virtual Cell&
cell(
unsigned row,
unsigned col)=0;
52 virtual unsigned numRows()
const=0;
53 virtual unsigned numCols()
const=0;
63 int colX(
double x)
const;
65 int rowY(
double y)
const;
virtual void show()=0
render onto cairo surface
virtual double height() const =0
height of cell
std::vector< double > rightColMargin
coordinates of right and bottom margins of cells. Valid after draw()
int colX(double x) const
column at x in unzoomed coordinates
virtual bool evenHeight() const
whether cells all have the same height or not
Cell template parameter duck types this interface.
virtual void moveCursorTo(double x, double y)=0
move current cursor to x,y
int rowY(double y) const
row at y in unzoomed coordinates
std::vector< double > bottomRowMargin
virtual unsigned numCols() const =0
virtual Cell & cell(unsigned row, unsigned col)=0
return reference to cell row, col. Reference is valid until next call to cell()
virtual JustificationStruct::Justification justification(unsigned col) const
justification of col
virtual unsigned numRows() const =0
virtual double width() const =0
width of cell on canvas