Merge branch 'dvbsi++' of coolstreamtech.de:cst-public-gui-neutrino into dvbsi++

Origin commit data
------------------
Branch: ni/coolstream
Commit: 0a557e4056
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2012-11-30 (Fri, 30 Nov 2012)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
[CST] Focus
2012-11-30 12:34:29 +04:00
41 changed files with 221 additions and 154 deletions

View File

@@ -389,6 +389,20 @@ void CListFrame::refreshScroll(void)
}
}
int CListFrame::paintListIcon(int x, int y, int line)
{
int xDiff = 0;
if ((!m_pLines->Icon.empty()) && (m_pLines->Icon[line] != "")) {
int icol_w, icol_h;
frameBuffer->getIconSize(m_pLines->Icon[line].c_str(), &icol_w, &icol_h);
if ((icol_w > 0) && (icol_h > 0)) {
frameBuffer->paintIcon(m_pLines->Icon[line], x+m_cFrame.iX, y+m_cFrame.iY-m_nFontListHeight, m_nFontListHeight);
xDiff = icol_w + TEXT_BORDER_WIDTH;
}
}
return xDiff;
}
void CListFrame::refreshList(void)
{
//TRACE("[CListFrame]->refreshList: %d\r\n",m_nCurrentLine);
@@ -417,6 +431,9 @@ void CListFrame::refreshList(void)
int width;
int x = m_cFrameListRel.iX + TEXT_BORDER_WIDTH;
y += m_nFontListHeight;
int xDiff = paintListIcon(x, y, line);
int net_width = m_cFrameListRel.iWidth - ROW_BORDER_WIDTH * (m_pLines->rows - 1);
for(int row = 0; row < m_pLines->rows; row++)
{
@@ -426,8 +443,10 @@ void CListFrame::refreshList(void)
width = m_cFrameListRel.iWidth - x + m_cFrameListRel.iX - TEXT_BORDER_WIDTH;
//TRACE(" normalize width to %d , x:%d \r\n",width,x);
}
m_pcFontList->RenderString(x+m_cFrame.iX, y+m_cFrame.iY,
width, m_pLines->lineArray[row][line].c_str(),
if (row > 0)
xDiff = 0;
m_pcFontList->RenderString(x+m_cFrame.iX+xDiff, y+m_cFrame.iY,
width-xDiff, m_pLines->lineArray[row][line].c_str(),
color, 0, true); // UTF-8
x += width + ROW_BORDER_WIDTH;
}
@@ -462,13 +481,18 @@ void CListFrame::refreshLine(int line)
int width;
int x = m_cFrameListRel.iX + TEXT_BORDER_WIDTH;
y += m_nFontListHeight;
int xDiff = paintListIcon(x, y, line);
int net_width = m_cFrameListRel.iWidth - ROW_BORDER_WIDTH * (m_pLines->rows - 1);
for(int row = 0; row < m_pLines->rows; row++)
{
width = std::min(m_pLines->rowWidth[row] * net_width / 100,
m_cFrameListRel.iWidth - x + m_cFrameListRel.iX - TEXT_BORDER_WIDTH);
m_pcFontList->RenderString(x+m_cFrame.iX, y+m_cFrame.iY,
width, m_pLines->lineArray[row][line].c_str(),
if (row > 0)
xDiff = 0;
m_pcFontList->RenderString(x+m_cFrame.iX+xDiff, y+m_cFrame.iY,
width-xDiff, m_pLines->lineArray[row][line].c_str(),
color, 0, true); // UTF-8
x += width + ROW_BORDER_WIDTH;
}

View File

@@ -63,6 +63,7 @@ typedef struct
std::string lineHeader[LF_MAX_ROWS];
std::vector<std::string> lineArray[LF_MAX_ROWS];
int rowWidth[LF_MAX_ROWS];
std::vector<std::string> Icon;
}LF_LINES;
class CListFrame
@@ -78,6 +79,7 @@ class CListFrame
void refreshHeaderList(void);
void reSizeMainFrameWidth(int maxTextWidth);
void reSizeMainFrameHeight(int maxTextHeight);
int paintListIcon(int x, int y, int line);
/* Variables */
LF_LINES* m_pLines;