Next / Previous / Contents / TCC Help System / NM Tech homepage

33. class RowLabel: Base class for row labels

cbchistlib.py
# - - - - -   c l a s s   R o w L a b e l

class RowLabel(object):
    '''Base class for row labels.

      Exports:
        RowLabel(text):
          [ text is a string ->
              return a new RowLabel with that string as its contents ]
        .text:    [ as passed to constructor ]
        .html(sox, **kw):         # Abstract class
          [ sox is a sox.Sox instance ->
              sox  +:=  self rendered as a th et.Element with
                        attributes added from kw ]
        .fo(sox, spanCount):      # Abstract class
          [ (sox is a sox.Sox instance) and
            (spanCount is a positive int) ->
              sox  +:=  self rendered as an XSL-FO table-cell that
                        spans (spanCount) rows ]
        .foRowSpan(spanCount):
          [ if spanCount > 1 ->
              return {'number-rows-spanned': str(spanCount)}
            else ->
              return {} ]
    '''