Definition at line 724 of file TextEdit.h. References OglGui::OglWindow::H(), mCaretX, mCaretY, OglGui::DocDimensions::mDocX, OglGui::DocDimensions::mDocY, mHorizontalScrollBar, mLeftMargin, mLineH, mVerticalScrollBar, and OglGui::OglWindow::W(). Referenced by KeyboardFunc(), and RecomputeDocument(). 00725 { 00726 int minY = mHorizontalScrollBar ? mHorizontalScrollBar->H() : 0; 00727 int maxW = W() - (mVerticalScrollBar ? mVerticalScrollBar->W() : 0); 00728 00729 if (mCaretY < minY) 00730 { 00731 mDocY -= (mCaretY-minY)-6; 00732 mCaretY = minY + 6; 00733 } 00734 if (mCaretY > H() - mLineH) 00735 { 00736 mDocY -= mCaretY - (H() - mLineH); 00737 mCaretY = H() - mLineH; 00738 } 00739 if (mCaretX < 0) 00740 { 00741 mDocX -= mCaretX-mLeftMargin;; 00742 mCaretX = mLeftMargin; 00743 } 00744 if (mCaretX > maxW - 8) 00745 { 00746 mDocX -= mCaretX - (maxW-8); 00747 } 00748 }
Here is the call graph for this function:
|