| 652 | } |
| 653 | |
| 654 | void DbgFileView::onRenderCell(Point2I offset, Point2I cell, bool selected, bool) |
| 655 | { |
| 656 | Point2I cellOffset = offset; |
| 657 | cellOffset.x += 4; |
| 658 | |
| 659 | //draw the break point marks |
| 660 | if (mFileView[cell.y].breakOnLine) |
| 661 | { |
| 662 | GFX->getDrawUtil()->setBitmapModulation(mProfile->mFontColorHL); |
| 663 | GFX->getDrawUtil()->drawText(mFont, cellOffset, "#"); |
| 664 | } |
| 665 | else if (mFileView[cell.y].breakPosition) |
| 666 | { |
| 667 | GFX->getDrawUtil()->setBitmapModulation(mProfile->mFontColor); |
| 668 | GFX->getDrawUtil()->drawText(mFont, cellOffset, "-"); |
| 669 | } |
| 670 | cellOffset.x += 8; |
| 671 | |
| 672 | //draw in the "current line" indicator |
| 673 | if (mFileName == mPCFileName && (cell.y + 1 == mPCCurrentLine)) |
| 674 | { |
| 675 | GFX->getDrawUtil()->setBitmapModulation(mProfile->mFontColorHL); |
| 676 | GFX->getDrawUtil()->drawText(mFont, cellOffset, "=>"); |
| 677 | } |
| 678 | |
| 679 | //by this time, the cellOffset has been incremented by 44 - the value of gFileXOffset |
| 680 | cellOffset.x += 32; |
| 681 | |
| 682 | //hilite the line if selected |
| 683 | if (selected) |
| 684 | { |
| 685 | if (mBlockStart == -1) |
| 686 | { |
| 687 | GFX->getDrawUtil()->drawRectFill(RectI(cellOffset.x - 2, cellOffset.y - 3, |
| 688 | mCellSize.x + 4, mCellSize.y + 6), mProfile->mFillColorHL); |
| 689 | } |
| 690 | else if (mBlockStart >= 0 && mBlockEnd > mBlockStart && mBlockEnd <= S32(dStrlen(mFileView[cell.y].text) + 1)) |
| 691 | { |
| 692 | S32 startPos, endPos; |
| 693 | char tempBuf[256]; |
| 694 | dStrcpy(tempBuf, mFileView[cell.y].text, 256); |
| 695 | |
| 696 | //get the end coord |
| 697 | tempBuf[mBlockEnd] = '\0'; |
| 698 | endPos = mFont->getStrWidth((const UTF8 *)tempBuf); |
| 699 | |
| 700 | //get the start coord |
| 701 | tempBuf[mBlockStart] = '\0'; |
| 702 | startPos = mFont->getStrWidth((const UTF8 *)tempBuf); |
| 703 | |
| 704 | //draw the hilite |
| 705 | GFX->getDrawUtil()->drawRectFill(RectI(cellOffset.x + startPos, cellOffset.y - 3, endPos - startPos + 2, mCellSize.y + 6), mProfile->mFillColorHL); |
| 706 | } |
| 707 | } |
| 708 | |
| 709 | //draw the line of text |
| 710 | GFX->getDrawUtil()->setBitmapModulation(mFileView[cell.y].breakOnLine ? mProfile->mFontColorHL : mProfile->mFontColor); |
| 711 | GFX->getDrawUtil()->drawText(mFont, cellOffset, mFileView[cell.y].text); |
nothing calls this directly
no test coverage detected