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

int OglGui::TextEdit::FindInsertionIndexAtWidth ( string str,
int  w 
) [inline]

Definition at line 462 of file TextEdit.h.

References FindWidthAtIndex().

Referenced by MouseFunc().

00463     {
00464         int len = str->length();
00465         int ind = 0, indW;
00466         while (ind<len && (indW=FindWidthAtIndex(str, ind)) < w)
00467             ind++;
00468  
00469         // Find closest side for insertion. If clicked on first halve of
00470         // character insert before, otherwise after
00471         if (ind && (indW - (indW - FindWidthAtIndex(str, ind-1))/2) > w)
00472             ind--;
00473         return ind;
00474     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:27:05 2011 for ImpalaSrc by  doxygen 1.5.1