Definition at line 597 of file TextEdit.h. References FindWidthAtIndex(), GetSelectionLeftRight(), InvertBlock(), mCaret, OglGui::DocDimensions::mDocX, mLeftMargin, mLineH, and mMark. Referenced by DrawText(). 00598 { 00599 if (mMark == mCaret) 00600 return; 00601 00602 int left, right; 00603 int xEnd, xStart, yEnd = y + mLineH; 00604 00605 GetSelectionLeftRight(left, right); 00606 00607 if (ind >= left && indEnd <= right) 00608 { 00609 if (*str == "") 00610 xEnd = mLeftMargin+4; 00611 else 00612 xEnd = FindWidthAtIndex(str, indEnd-ind); 00613 InvertBlock(mLeftMargin+mDocX, y, xEnd+mDocX, yEnd); 00614 } 00615 else 00616 { 00617 if (ind >= left && ind <= right) 00618 { 00619 xEnd = FindWidthAtIndex(str, right-ind); 00620 InvertBlock(mLeftMargin+mDocX, y, xEnd+mDocX, yEnd); 00621 } 00622 if (indEnd > left && indEnd <= right) 00623 { 00624 xStart = FindWidthAtIndex(str, left-ind)+mDocX; 00625 xEnd = FindWidthAtIndex(str, indEnd-ind)+mDocX; 00626 InvertBlock(xStart, y, xEnd, yEnd); 00627 } 00628 if (ind < left && indEnd > right) 00629 { 00630 xStart = FindWidthAtIndex(str, left-ind)+mDocX; 00631 xEnd = FindWidthAtIndex(str, right-ind)+mDocX; 00632 InvertBlock(xStart, y, xEnd, yEnd); 00633 } 00634 } 00635 }
Here is the call graph for this function:
|