////////////////////////////////////////////////////////////////////////// //From CControl ////////////////////////////////////////////////////////////////////////// void CSelectGroup::Draw(CGraphic& gc)const { TInt index=0; for(TInt i=0; i<iMaxLinePerPage; i++) { index=i+iFirstIndex; if(index>=iSelectArray.Count()) break; if(index==iSelectedIndex) { TRect rect(iStartPoint+TPoint(0,i*iLineHeight),iItemSize); gc.SetPenColor(KPopMenuRectColor); gc.SetPenStyle(CGraphicsContext::ESolidPen); gc.SetBrushColor(KNaviPaneSelectedItemColor); gc.SetBrushStyle(CGraphicsContext::ESolidBrush); gc.DrawRect(rect); gc.SetBrushStyle(CGraphicsContext::ENullBrush); gc.SetPenColor(KRgbWhite); } iSelectArray[index]->DrawItem(gc,TRect(iStartPoint+TPoint(0,i*iLineHeight),iItemSize)); } if(iScrollbar) iScrollbar->Draw(gc); }
void CNormalListBoxItem::Draw(CGraphic& aGraphic,TPoint& aPoint) const { UtilityTools::WriteLogsL(_L("CNormalListBoxItem::Draw")); ASSERT(iSlideText); TRect rect(iItemSize); rect.Move(aPoint); if(iActive) { aGraphic.SetPenColor(KTextColor); aGraphic.SetPenStyle(CGraphicsContext::ESolidPen); aGraphic.SetBrushColor(KListSelectedColor); aGraphic.SetBrushStyle(CGraphicsContext::ESolidBrush); aGraphic.DrawRect(rect); aGraphic.SetBrushStyle(CGraphicsContext::ENullBrush); } if(iIcon) { rect.iTl.iX += iIcon->SizeInPixels().iWidth; } if(iIcon) { ASSERT(iIconMask); aGraphic.BitBltMasked(aPoint,iIcon,iIconMask); } iSlideText->SetClientRect(rect); iSlideText->Draw(aGraphic); aPoint.iY += iItemSize.iHeight; UtilityTools::WriteLogsL(_L("CNormalListBoxItem::Draw End")); }
void CCurThreeListBoxItem::Draw(CGraphic& aGraphic,TPoint& aPoint) const { TPoint point = aPoint; ASSERT(iSlideText); TRect rect; if(iActive) { TSize size = iItemSize; size.iHeight *= 3; rect = size; rect.Move(point); aGraphic.SetPenColor(KTextColor); aGraphic.SetPenStyle(CGraphicsContext::ESolidPen); aGraphic.SetBrushColor(KListSelectedColor); aGraphic.SetBrushStyle(CGraphicsContext::ESolidBrush); aGraphic.DrawRect(rect); aGraphic.SetBrushStyle(CGraphicsContext::ENullBrush); } if(iIcon) { ASSERT(iIconMask); aGraphic.BitBltMasked(point,iIcon,iIconMask); } rect = iItemSize; if(iIcon) { rect.iTl.iX += iIcon->SizeInPixels().iWidth; } rect.Move(point); iSlideText->SetClientRect(rect); iSlideText->Draw(aGraphic); if(iActive) { aGraphic.SetPenColor(iTextColor); rect.Move(0,iItemSize.iHeight); if(iSecondText) { aGraphic.DrawText(*iSecondText,rect); } rect.Move(0,iItemSize.iHeight); if(iThirdText) { aGraphic.DrawText(*iThirdText,rect); } aPoint.iY += iItemSize.iHeight*3; } else { aPoint.iY += iItemSize.iHeight; } }
void CBrowserPicWindow::DoDraw(CGraphic& aGraphic) const { if(iFullScreenShow) { DrawBackground(aGraphic); aGraphic.DrawRect( iMainEngine.ScreenLayout().ScreenSize()); if(NULL != iShowBmp) { TRect rect(0,0,0,0); TRect rect1(0,0,0,0); CFbsBitGc& pGc = aGraphic.GetBmpGc(); DrawImage(pGc,rect,rect1,1); } } else { //iPicture->SetShowRect(iMainEngine.ScreenLayout().GetClientRect()); //SetShowRect(iMainEngine.ScreenLayout().WhiteBackgroundRect()); /*TInt nWidth = iMainEngine.ScreenLayout().Font()->MeasureText(ptr); aGraphic.SetPenColor(KBlackRgb); aGraphic.SetPenStyle(CFbsBitGc::ESolidPen); if(nWidth>iMainEngine.ScreenLayout().GetStatusPaneRect().iBr.iX/2) aGraphic.DrawText(TPoint(iMainEngine.ScreenLayout().GetStatusPaneRect().iBr.iX/2,15), ptr); else aGraphic.DrawText(TPoint(iMainEngine.ScreenLayout().GetStatusPaneRect().iBr.iX-nWidth,15), ptr);*/ if(NULL != iShowBmp) { TRect rect(0,0,0,0); TRect rect1(0,0,0,0); CFbsBitGc& pGc = aGraphic.GetBmpGc(); DrawImage(pGc,rect,rect1,0); } } //左右箭头提示翻页 TRect nScreen; TPoint nLeft; TPoint nRight; if(iFullScreenShow) nScreen=iMainEngine.ScreenLayout().ScreenSize(); else nScreen=iMainEngine.ScreenLayout().GetClientRect(); nLeft.iX=0; nLeft.iY=nScreen.iTl.iY +(nScreen.iBr.iY-nScreen.iTl.iY)/2 ; TInt nWidth = iMainEngine.ScreenLayout().Font()->MeasureText(iMainEngine.GetDesById(ETurkeyTextRes_RightArrow)); nRight.iX=nScreen.iBr.iX-nWidth+nScreen.iTl.iX ; nRight.iY=nScreen.iTl.iY +(nScreen.iBr.iY-nScreen.iTl.iY)/2; if(iSelIndex==0 && iFileNameArray->Count()>1) aGraphic.DrawText_Bold(nRight, iMainEngine.GetDesById(ETurkeyTextRes_RightArrow)); else if(iSelIndex==iFileNameArray->Count()-1 && iFileNameArray->Count()>1) aGraphic.DrawText_Bold(nLeft , iMainEngine.GetDesById(ETurkeyTextRes_LeftArrow)); else if(iFileNameArray->Count()>1) { aGraphic.DrawText_Bold(nLeft, iMainEngine.GetDesById(ETurkeyTextRes_LeftArrow)); aGraphic.DrawText_Bold(nRight , iMainEngine.GetDesById(ETurkeyTextRes_RightArrow)); } }