This function generates one table-column
element for each physical table column. For the computation
of the detail column count, see Section 28.1, “CbcHist.nPhysCols(): How many physical
detail columns will this occupy?”; the total column count is one
larger, because of the row-label column. For the styling of
each element, see Section 13.11.11, “FO_DETAIL_COL_WIDE”.
# - - - f o T a b l e C o l u m n s
def foTableColumns(s, cbcHist):
'''Generate the table-column elements.
'''
#-- 1
# [ nPhysCols := number of physical columns cbcHist will
# require, but no more than lib.MAX_PHYS_COLS ]
nPhysCols = cbcHist.nPhysCols(lib.MAX_PHYS_COLS)
#-- 2
# [ s +:= one unsized column and (nPhysCols) columns of
# width lib.FO_DETAIL_COL_WIDE ]
s.leaf('table-column')
for colx in range(nPhysCols):
s.leaf('table-column', lib.FO_DETAIL_COL_WIDE)