if (tag.HasParam(wxT("VALIGN"))) m_tValign = tag.GetParam(wxT("VALIGN")); else m_tValign = wxEmptyString;
if (tag.HasParam(wxT("CELLSPACING")) && tag.ScanParam(wxT("CELLSPACING"), wxT("%i"), &m_Spacing) == 1) {} else m_Spacing = 2;
if (tag.HasParam(wxT("CELLPADDING")) && tag.ScanParam(wxT("CELLPADDING"), wxT("%i"), &m_Padding) == 1) {} else m_Padding = 3;
if (tag.HasParam(wxT("VALIGN"))) m_tValign = tag.GetParam(wxT("VALIGN")); else m_tValign = wxEmptyString;
if (tag.HasParam(wxT("CELLSPACING")) && tag.ScanParam(wxT("CELLSPACING"), wxT("%i"), &m_Spacing) == 1) {} else m_Spacing = 2;
if (tag.HasParam(wxT("CELLPADDING")) && tag.ScanParam(wxT("CELLPADDING"), wxT("%i"), &m_Padding) == 1) {} else m_Padding = 3;
m_CellInfo[i] = (cellStruct*) realloc(m_CellInfo[i], sizeof(cellStruct) * cols);
for (j = m_NumCols; j < cols; j++)
m_CellInfo[i][j].flag = cellFree;
}
m_ColsInfo = (colStruct*) realloc(m_ColsInfo, sizeof(colStruct) * cols);
m_CellInfo[i] = (cellStruct*) realloc(m_CellInfo[i], sizeof(cellStruct) * cols);
for (j = m_NumCols; j < cols; j++)
m_CellInfo[i][j].flag = cellFree;
}
m_ColsInfo = (colStruct*) realloc(m_ColsInfo, sizeof(colStruct) * cols);
wxSscanf(wd.c_str(), wxT("%i%%"), &m_ColsInfo[c].width);
m_ColsInfo[c].units = wxHTML_UNITS_PERCENT;
}
wxSscanf(wd.c_str(), wxT("%i%%"), &m_ColsInfo[c].width);
m_ColsInfo[c].units = wxHTML_UNITS_PERCENT;
}
{
if (tag.HasParam(wxT("COLSPAN"))) tag.ScanParam(wxT("COLSPAN"), wxT("%i"), &m_CellInfo[r][c].colspan);
if (tag.HasParam(wxT("ROWSPAN"))) tag.ScanParam(wxT("ROWSPAN"), wxT("%i"), &m_CellInfo[r][c].rowspan);
{
if (tag.HasParam(wxT("COLSPAN"))) tag.ScanParam(wxT("COLSPAN"), wxT("%i"), &m_CellInfo[r][c].colspan);
if (tag.HasParam(wxT("ROWSPAN"))) tag.ScanParam(wxT("ROWSPAN"), wxT("%i"), &m_CellInfo[r][c].rowspan);
- if (valign == "TOP") m_CellInfo[r][c].valign = wxHTML_ALIGN_TOP;
- else if (valign == "BOTTOM") m_CellInfo[r][c].valign = wxHTML_ALIGN_BOTTOM;
+ if (valign == wxT("TOP")) m_CellInfo[r][c].valign = wxHTML_ALIGN_TOP;
+ else if (valign == wxT("BOTTOM")) m_CellInfo[r][c].valign = wxHTML_ALIGN_BOTTOM;
if (m_WidthFloat < 0) m_Width = (100 + m_WidthFloat) * w / 100;
else m_Width = m_WidthFloat * w / 100;
}
if (m_WidthFloat < 0) m_Width = (100 + m_WidthFloat) * w / 100;
else m_Width = m_WidthFloat * w / 100;
}
- for (actrow = 0; actrow <= m_NumRows; actrow++) ypos[actrow] = m_Spacing;
-
- for (actrow = 0; actrow < m_NumRows; actrow++) {
-
+ ypos[0] = m_Spacing;
+ for (actrow = 1; actrow <= m_NumRows; actrow++) ypos[actrow] = -1;
+ for (actrow = 0; actrow < m_NumRows; actrow++)
+ {
+ if (ypos[actrow] == -1) ypos[actrow] = ypos[actrow-1];
for (int i = actcol; i < m_CellInfo[actrow][actcol].colspan + actcol; i++)
fullwid += m_ColsInfo[i].pixwidth;
fullwid += (m_CellInfo[actrow][actcol].colspan - 1) * m_Spacing;
for (int i = actcol; i < m_CellInfo[actrow][actcol].colspan + actcol; i++)
fullwid += m_ColsInfo[i].pixwidth;
fullwid += (m_CellInfo[actrow][actcol].colspan - 1) * m_Spacing;
- actcell -> SetMinHeight(m_CellInfo[actrow][actcol].minheight, m_CellInfo[actrow][actcol].valign);
- actcell -> Layout(fullwid);
+ actcell->SetMinHeight(m_CellInfo[actrow][actcol].minheight, m_CellInfo[actrow][actcol].valign);
+ actcell->Layout(fullwid);
if (m_CellInfo[actrow][actcol].flag != cellUsed) continue;
actcell = m_CellInfo[actrow][actcol].cont;
if (m_CellInfo[actrow][actcol].flag != cellUsed) continue;
actcell = m_CellInfo[actrow][actcol].cont;
ypos[actrow + m_CellInfo[actrow][actcol].rowspan] - ypos[actrow] - m_Spacing,
m_CellInfo[actrow][actcol].valign);
fullwid = 0;
for (int i = actcol; i < m_CellInfo[actrow][actcol].colspan + actcol; i++)
fullwid += m_ColsInfo[i].pixwidth;
fullwid += (m_CellInfo[actrow][actcol].colspan - 1) * m_Spacing;
ypos[actrow + m_CellInfo[actrow][actcol].rowspan] - ypos[actrow] - m_Spacing,
m_CellInfo[actrow][actcol].valign);
fullwid = 0;
for (int i = actcol; i < m_CellInfo[actrow][actcol].colspan + actcol; i++)
fullwid += m_ColsInfo[i].pixwidth;
fullwid += (m_CellInfo[actrow][actcol].colspan - 1) * m_Spacing;
- actcell -> Layout(fullwid);
- actcell -> SetPos(m_ColsInfo[actcol].leftpos, ypos[actrow]);
+ actcell->Layout(fullwid);
+ actcell->SetPos(m_ColsInfo[actcol].leftpos, ypos[actrow]);
- c -> SetWidthFloat(tag);
- m_Table = new wxHtmlTableCell(c, tag);
- m_OldAlign = m_WParser -> GetAlign();
+ c->SetWidthFloat(tag, m_WParser->GetPixelScale());
+ m_Table = new wxHtmlTableCell(c, tag, m_WParser->GetPixelScale());
+ m_OldAlign = m_WParser->GetAlign();
- m_WParser -> SetAlign(m_OldAlign);
- m_WParser -> SetContainer(oldcont);
- m_WParser -> CloseContainer();
+ m_WParser->SetAlign(m_OldAlign);
+ m_WParser->SetContainer(oldcont);
+ m_WParser->CloseContainer();
- else {
- m_WParser -> SetAlign(m_OldAlign);
- c = m_WParser -> SetContainer(new wxHtmlContainerCell(m_Table));
- m_Table -> AddCell(c, tag);
+ else
+ {
+ m_WParser->SetAlign(m_OldAlign);
+ c = m_WParser->SetContainer(new wxHtmlContainerCell(m_Table));
+ m_Table->AddCell(c, tag);
- if (als == "RIGHT") m_WParser -> SetAlign(wxHTML_ALIGN_RIGHT);
- else if (als == "CENTER") m_WParser -> SetAlign(wxHTML_ALIGN_CENTER);
+ if (als == wxT("RIGHT")) m_WParser->SetAlign(wxHTML_ALIGN_RIGHT);
+ else if (als == wxT("CENTER")) m_WParser->SetAlign(wxHTML_ALIGN_CENTER);