Example #1
0
short int ListPage::DrawFrame(Rect drawRect, colorSets whichColors)
{
	if (m_osdRegionIndex == 0)
		return 0;

	ListColors theColors = GetColorDef(whichColors);

	drawRect.Fill(m_osdRegionIndex, theColors.bgColor);
	drawRect.DrawBox(m_osdRegionIndex, 2, theColors.frameColor);

	return 2;
}
Example #2
0
short int ListPage::DrawHeaderFrame(Rect drawRect)
{
	if (m_osdRegionIndex == 0)
		return 0;

	ListColors theColors = GetColorDef(headerColors);

	drawRect.Fill(m_osdRegionIndex, theColors.bgColor);
	drawRect.DrawBox(m_osdRegionIndex, 2, theColors.frameColor);

	return 2;
}
Example #3
0
void ListPage::DrawScrollBar()
{
	Rect r = ScrollBarRect();
	DrawFrame(r, scrollBarColors);

	short int iItemCount = m_items.size() ? (short int) m_items.size() : 1;
		short int iBarHeight = r.h;
		short int iBarSize = (CountItemsInView() * iBarHeight)/iItemCount;
		iBarSize = max(iBarSize,6);
		iBarSize = min(iBarSize,iBarHeight);
		short int iBarPos = (m_firstItemInView * iBarHeight) / iItemCount;

		r.y += FIXINT2SHORTWARNING(iBarPos);
	r.h = iBarSize;
		r.x += 2;
		r.w = SCROLLBAR_WIDTH - 4;

	r.Fill(m_osdRegionIndex, GetColorDef(scrollBarColors).textColor);
}