This class and its subclasses are responsible for actually drawing the
cell in the grid. You may pass instances of this class as arguments to
Grid or GridCellAttr to specify a
renderer to be used by a single cell, a row, a column, or the whole
grid, using grid#set_default_renderer
As well as predefined renderers for displaying numbers, text and so
forth, completely custom subclasses can be defined to draw arbitrary
content in grid cells, including text and graphics. To define your own
renderer, inherit from one of the predefined classes (for example,
GridCellStringRenderer, and define your
own draw method. Among the arguments passed to
draw is a DC which can be used for drawing. Note that it is
not possible to inherit directly from this class.
This example draws the text content normally, with a red diagonal line
running through the cell:
GridCellWorker
GridCellStringRenderer, GridCellNumberRenderer, GridCellFloatRenderer, GridCellBoolRenderer
Draw the given cell on the provided DC inside the given rectangle
using the style specified by the attribute and the default or selected
state corresponding to the isSelected value.
This pure virtual function has a default implementation which will
prepare the DC using the given attribute: it will draw the rectangle
with the background colour from attr and set the text colour and font.
Get the preferred size of the cell for its contents.
[This page automatically generated from the Textile source at 2023-06-13 21:31:36 +0000]