mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-27 01:26:30 +00:00
Added: html TH element
--HG-- branch : develop
This commit is contained in:
parent
2eb56b6460
commit
fe476d4872
2 changed files with 15 additions and 0 deletions
|
@ -1783,11 +1783,21 @@ namespace NLGUI
|
|||
_TR.push_back(false);
|
||||
}
|
||||
break;
|
||||
case HTML_TH:
|
||||
// TH is similar to TD, just different font style
|
||||
case HTML_TD:
|
||||
{
|
||||
// Get cells parameters
|
||||
getCellsParameters (MY_HTML_TD, true);
|
||||
|
||||
if (element_number == HTML_TH)
|
||||
{
|
||||
_FontWeight.push_back(FONT_WEIGHT_BOLD);
|
||||
// center if not specified otherwise. TD/TH present/value arrays have same indices
|
||||
if (!(present[MY_HTML_TD_ALIGN] && value[MY_HTML_TD_ALIGN]))
|
||||
_CellParams.back().Align = CGroupCell::Center;
|
||||
}
|
||||
|
||||
CGroupTable *table = getTable();
|
||||
if (table)
|
||||
{
|
||||
|
@ -2124,6 +2134,9 @@ namespace NLGUI
|
|||
endParagraph();
|
||||
// Add a cell
|
||||
break;
|
||||
case HTML_TH:
|
||||
popIfNotEmpty (_FontWeight);
|
||||
// no break;
|
||||
case HTML_TD:
|
||||
popIfNotEmpty (_CellParams);
|
||||
if (!_Cells.empty())
|
||||
|
|
|
@ -481,6 +481,8 @@ namespace NLGUI
|
|||
HTML_DTD->tags[HTML_TR].number_of_attributes = sizeof(tr_attr) / sizeof(HTAttr) - 1;
|
||||
HTML_DTD->tags[HTML_TD].attributes = td_attr;
|
||||
HTML_DTD->tags[HTML_TD].number_of_attributes = sizeof(td_attr) / sizeof(HTAttr) - 1;
|
||||
HTML_DTD->tags[HTML_TH].attributes = td_attr;
|
||||
HTML_DTD->tags[HTML_TH].number_of_attributes = sizeof(td_attr) / sizeof(HTAttr) - 1;
|
||||
HTML_DTD->tags[HTML_IMG].attributes = img_attr;
|
||||
HTML_DTD->tags[HTML_IMG].number_of_attributes = sizeof(img_attr) / sizeof(HTAttr) - 1;
|
||||
HTML_DTD->tags[HTML_INPUT].attributes = input_attr;
|
||||
|
|
Loading…
Reference in a new issue