// Created: 25.05.99
// RCS-ID: $Id$
// Copyright: (c) wxWidgets team
-// Licence: wxWidgets licence
+// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
// ============================================================================
// timer stuff
// ----------------------------------------------------------------------------
-wxCaretTimer::wxCaretTimer(wxCaret *caret)
-{
- m_caret = caret;
+wxCaretTimer::wxCaretTimer(wxCaret *caret)
+{
+ m_caret = caret;
}
-void wxCaretTimer::Notify()
-{
- m_caret->OnTimer();
+void wxCaretTimer::Notify()
+{
+ m_caret->OnTimer();
}
void wxCaret::OnTimer()
void wxCaret::InitGeneric()
{
- m_hasFocus = TRUE;
- m_blinkedOut = TRUE;
+ m_hasFocus = true;
+ m_blinkedOut = true;
m_xOld =
m_yOld = -1;
//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
// ----------------------------------------------------------------------------
void wxCaret::OnSetFocus()
{
- m_hasFocus = TRUE;
+ m_hasFocus = true;
if ( IsVisible() )
Refresh();
void wxCaret::OnKillFocus()
{
- m_hasFocus = FALSE;
+ m_hasFocus = false;
if ( IsVisible() )
{