Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

void OglGui::TextEdit::ComputeCaretPosition (  )  [inline]

Definition at line 399 of file TextEdit.h.

References FindWidthAtIndex(), GetLineAtIndex(), mCaret, mCaretX, mCaretY, OglGui::DocDimensions::mDocH, OglGui::DocDimensions::mDocX, OglGui::DocDimensions::mDocY, mLeftMargin, and mLineH.

Referenced by BackSpace(), DeleteKey(), DisplayFunc(), HandleMoveKey(), InsertKey(), InsertString(), MouseFunc(), OnScroll(), RecomputeDocument(), and ReshapeFunc().

00400     {
00401         int y = mDocH + mDocY - mLineH;
00402         int lineInd = 0;
00403         int nChar;
00404 
00405         while ((nChar = GetLineAtIndex(0, lineInd) + 1) &&
00406                lineInd+nChar <= mCaret)
00407         {
00408             lineInd += nChar;
00409             y -= mLineH;
00410         }
00411         mCaretY = y;
00412 
00413         int x = mLeftMargin;
00414         if (nChar)
00415         {
00416             string str;
00417             GetLineAtIndex(&str, lineInd);
00418             x = FindWidthAtIndex(&str, mCaret - lineInd) + mDocX;
00419         }
00420         mCaretX = x;
00421     }

Here is the call graph for this function:


Generated on Fri Mar 19 12:07:59 2010 for ImpalaSrc by  doxygen 1.5.1