}
}
-void
-wxLayoutList::UpdateCursorScreenPos(wxDC &dc)
-{
- wxCHECK_RET( m_CursorLine, "no cursor line" );
-
- // 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,
- true /* suppress update */);
- ApplyStyle(SiBackup, dc); // restore it
-}
-
wxPoint
wxLayoutList::GetCursorScreenPos(wxDC &dc)
{
- UpdateCursorScreenPos(dc);
-
return m_CursorScreenPos;
}
wxLayoutList::DrawCursor(wxDC &dc, bool active, wxPoint const &translate)
{
if ( m_movedCursor )
- {
- UpdateCursorScreenPos(dc);
-
m_movedCursor = false;
- }
wxPoint coords(m_CursorScreenPos);
coords += translate;
// use the wxWindows caret class instead of home grown cursor whenever possible
#ifdef __WXMSW__
- #undef WXLAYOUT_USE_CARET
- #define WXLAYOUT_USE_CARET 1
+# undef WXLAYOUT_USE_CARET
+# define WXLAYOUT_USE_CARET 1
#endif // __WXMSW__
// do not enable debug mode within Mahogany
*/
wxPoint GetCursorScreenPos(wxDC &dc);
- /** Calculates the cursor position on the screen.
- @param dc the dc to use for cursor position calculations
- */
- void UpdateCursorScreenPos(wxDC &dc);
-
/** Draws the cursor.
@param active If true, draw a bold cursor to mark window as
active.