-void
-wxLayoutList::UpdateCursorScreenPos(wxDC &dc,
- bool resetCursorMovedFlag,
- const wxPoint& translate)
-{
- wxCHECK_RET( m_CursorLine, "no cursor line" );
-
- if ( m_movedCursor )
- {
- // we need to save the current style, in case the layout() of
- // the line changes it
- wxLayoutStyleInfo SiBackup = m_CurrentStyleInfo;
- m_CursorLine->Layout(dc, this,
- &m_CursorScreenPos, &m_CursorSize,
- m_CursorPos.x,
- /* suppress update */ true);
- ApplyStyle(SiBackup, dc); // restore it
-
- if ( resetCursorMovedFlag )
- {
-#ifdef WXLAYOUT_USE_CARET
- // adjust the caret position
- wxPoint coords(m_CursorScreenPos);
- coords += translate;
-
- // and set it
- m_caret->Move(coords);
-#endif // WXLAYOUT_USE_CARET
-
- m_movedCursor = false;
- }
- }
-}
-