]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/caret.cpp
make the string properly 0 terminated and allow for one char more on the output buffer
[wxWidgets.git] / src / generic / caret.cpp
index 03040e1742e8efd0b505dc0e91da794744b2074f..b767a00c1ed53f1100c772adcd0d60c22a5e3945 100644 (file)
 // headers
 // ----------------------------------------------------------------------------
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma implementation "caret.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -150,6 +146,23 @@ void wxCaret::DoMove()
     //else: will be shown at the correct location when it is shown
 }
 
+void wxCaret::DoSize()
+{
+    int countVisible = m_countVisible;
+    if (countVisible > 0)
+    {
+        m_countVisible = 0;
+        DoHide();
+    }
+    // Change bitmap size
+    m_bmpUnderCaret = wxBitmap(m_width, m_height);
+    if (countVisible > 0)
+    {
+        m_countVisible = countVisible;
+        DoShow();
+    }
+}
+
 // ----------------------------------------------------------------------------
 // handling the focus
 // ----------------------------------------------------------------------------