Defined in file: hzDocument.h

Derivative of: hzHtmElem

In HTML tables have sub-tags only of <tr> (table row). Columns are effected by the <tr> sub-tags. In the first row the columns can be named by the <th> (table heading) tag, although this is frequently done with the <td> tag instead - meaning that When querying a table for a cell value, we have to specify the column-name and the row number. If the table has <th> tags in the first row, the values of these will be compared to the supplied column name. If the table does not have <th> tags in the first row and instead has <td> tags, the values of these will be used instead.

Constructors/Detructors

hzHtmTbl*hzHtmTbl(void)
void~hzHtmTbl(void)

Public Methods:

voidAddColumn(hzHtmCol* col)
uint32_tColcount(void)Establishes the number of column headers. If there are no <th> headers there will still be columns. Method is to check if there has been an edit (any additional tags) since the last report (of either row or column count). If not then the value held in m_NoCols is returned. Otherwise the columns are counted explicitly. In the absence of the row of table headers, the column count will be the row with the maximum number of columns. Arguments: None
hzStringGetCell(uint32_t nRow)uint32_t nCol, Return the cell from the supplied row and column. Method is to move thru the table's <tr> subnodes to get to the row, then move thur that row's <td> (or equivelent) tags to get to the column within the row (the cell).
hzStringGetColl(uint32_t nCol)Return the value (string) of the requested column In the case of a table, the only allowed sub-nodes are <tr> nodes. The columns for the table are all under the table's first <tr> sub-node as <th> nodes.
hzString&GetUrl(void)
uint32_tRowcount(void)Returns the number of rows. This will not include the row of headers. Arguments: None
voidSetBgColor(uint32_t color)
voidSetClass(const char* cls)
voidSetEmpty(const char* empty)
voidSetFgColor(uint32_t color)
voidSetHeight(uint32_t h)
voidSetTitle(const char* title)
voidSetUrl(const char* url)
voidSetWidth(uint32_t w)

Member Variables:

uint32_tm_BgColorBackground color
uint16_tm_BorderBorder width
uint16_tm_CellpadCell pading
uint16_tm_CellspaceCell spacing
hzStringm_ClassStyle sheet class
hzVect<hzHtmCol*>m_ColsColumns
hzStringm_EmptyMsg to be displayed when DoFooter() is called with no rows done
uint32_tm_FgColorForeground color
uint16_tm_HeightTotal hieght in pixels
hzStringm_TitleTitle of table
hzStringm_UrlTo be pre-pending for links
uint16_tm_WidthTotal width in pixels
uint16_tm_nColsNumber of columns
uint16_tm_nRowsNumber of data rows