From c328d0ad10f2c7c6726ef9db0a7933cf555b303e Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 25 Jul 2004 16:32:24 +0000 Subject: [PATCH] update the caret bitmap size in EVT_SIZE (patch 990361) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28483 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/generic/caret.h | 1 + src/generic/caret.cpp | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/include/wx/generic/caret.h b/include/wx/generic/caret.h index d840b7d8c8..96677b46d1 100644 --- a/include/wx/generic/caret.h +++ b/include/wx/generic/caret.h @@ -59,6 +59,7 @@ protected: virtual void DoShow(); virtual void DoHide(); virtual void DoMove(); + virtual void DoSize(); // blink the caret once void Blink(); diff --git a/src/generic/caret.cpp b/src/generic/caret.cpp index 03040e1742..08dd830068 100644 --- a/src/generic/caret.cpp +++ b/src/generic/caret.cpp @@ -150,6 +150,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 // ----------------------------------------------------------------------------