Table row renderer protocol
Factor handbook » UI framework » Building user interfaces » Pre-made UI gadgets » Table gadgets

Prev:<table> ( rows renderer -- table )
Next:Table row selection


Table gadgets use a row renderer to display rows and do a few other things.

Renderers are usually instances of singleton classes, since they don't need any state of their own. Renderers are required to implement a single generic word:
row-columns ( row renderer -- columns )


Renderers can also implement the following optional generic words for additional row information:
row-color ( row renderer -- color )

row-value ( row renderer -- object )

row-value? ( value row renderer -- ? )

row-summary ( row renderer -- object )


The following optional generic words allow the renderer to provide some information about the display of all rows:
prototype-row ( renderer -- columns )

column-alignment ( renderer -- alignment )

filled-column ( renderer -- n )

column-titles ( renderer -- strings )