]> git.saurik.com Git - wxWidgets.git/commitdiff
layout better
authorKarsten Ballüder <ballueder@usa.net>
Thu, 10 Jun 1999 14:27:40 +0000 (14:27 +0000)
committerKarsten Ballüder <ballueder@usa.net>
Thu, 10 Jun 1999 14:27:40 +0000 (14:27 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2738 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/richedit/wxllist.cpp
samples/richedit/wxllist.h

index e33fcc9bd8dc78955e4fc1433b77b16649d7d186..6511e8f7259711bdfc0af2c7cb6bdf1e14cd8a6c 100644 (file)
@@ -2118,26 +2118,9 @@ wxLayoutList::Recalculate(wxDC &dc, CoordType bottom)
    }
 }
 
-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;
 }
 
@@ -2348,11 +2331,7 @@ void
 wxLayoutList::DrawCursor(wxDC &dc, bool active, wxPoint const &translate)
 {
    if ( m_movedCursor )
-   {
-      UpdateCursorScreenPos(dc);
-
       m_movedCursor = false;
-   }
 
    wxPoint coords(m_CursorScreenPos);
    coords += translate;
index cef46fddabf03653c48addc70f07a3ba05cbee43..a8eaf78ec0bf02d3ac0c1fea4fda30b88e1953f4 100644 (file)
@@ -32,8 +32,8 @@
 
 // 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
@@ -995,11 +995,6 @@ public:
    */
    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.