Definition at line 680 of file TextEdit.h. References DrawTabbedLine(), FindFirstVisibleLine(), FindIndexAtWidth(), FindWidthAtIndex(), GetLineAtIndex(), OglGui::OglWindow::GetOGLWND(), OglGui::OglWindow::H(), HandleInvertLineSelection(), mCaret, mCaretColor, mCaretX, mCaretY, OglGui::DocDimensions::mDocX, mLeftMargin, mLineH, mMark, mShadowColor, and mText. Referenced by DisplayFunc(). 00681 { 00682 int yPos = H(); 00683 int ind = 0; 00684 00685 if ((ind = FindFirstVisibleLine(yPos)) > mText.length()) 00686 return; 00687 00688 string line; 00689 char buf[2048]; 00690 int nChar; 00691 00692 while (yPos >= -mLineH && (nChar = GetLineAtIndex(&line, ind))!=-1) 00693 { 00694 int bufInd = 0; 00695 int xOff = mLeftMargin + mDocX; 00696 bool doShow = true; 00697 00698 strncpy(buf, line.c_str(), 2047); 00699 buf[2047] ='\0'; 00700 00701 if (mDocX < 0) 00702 { 00703 bufInd = FindIndexAtWidth(&line, -mDocX); 00704 if ((xOff = FindWidthAtIndex(&line, bufInd) + mDocX) < 0) 00705 doShow = false; 00706 } 00707 if (doShow) // RvB added 2 to allow for smaller single line height 00708 DrawTabbedLine(xOff, yPos+2, buf + bufInd); 00709 00710 if (mMark != mCaret) // RvB: changed -4 into -2 for smaller line heights 00711 HandleInvertLineSelection(&line, ind, ind+nChar+1, yPos-2); 00712 ind += nChar+1; 00713 yPos -= mLineH; 00714 } 00715 if (GetOGLWND() == oglFocusWnd) { 00716 SetSolidLineColor(mCaretColor); 00717 } else { 00718 SetSolidLineColor(mShadowColor); 00719 } 00720 // RvB used to draw -4 changed to -2 to allow for smaller line height 00721 DrawLine(mCaretX, mCaretY-2, mCaretX, mCaretY-2+mLineH); 00722 }
Here is the call graph for this function:
|