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:
| void | AddColumn | (hzHtmCol* col) | |
| uint32_t | Colcount | (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 |
| hzString | GetCell | (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). |
| hzString | GetColl | (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_t | Rowcount | (void) | Returns the number of rows. This will not include the row of headers. Arguments: None |
| void | SetBgColor | (uint32_t color) | |
| void | SetClass | (const char* cls) | |
| void | SetEmpty | (const char* empty) | |
| void | SetFgColor | (uint32_t color) | |
| void | SetHeight | (uint32_t h) | |
| void | SetTitle | (const char* title) | |
| void | SetUrl | (const char* url) | |
| void | SetWidth | (uint32_t w) |
Member Variables:
| uint32_t | m_BgColor | Background color | |
| uint16_t | m_Border | Border width | |
| uint16_t | m_Cellpad | Cell pading | |
| uint16_t | m_Cellspace | Cell spacing | |
| hzString | m_Class | Style sheet class | |
| hzVect<hzHtmCol*> | m_Cols | Columns | |
| hzString | m_Empty | Msg to be displayed when DoFooter() is called with no rows done | |
| uint32_t | m_FgColor | Foreground color | |
| uint16_t | m_Height | Total hieght in pixels | |
| hzString | m_Title | Title of table | |
| hzString | m_Url | To be pre-pending for links | |
| uint16_t | m_Width | Total width in pixels | |
| uint16_t | m_nCols | Number of columns | |
| uint16_t | m_nRows | Number of data rows |