1. some minor but nasty bugs fixed (see post to the list)

2. new wxCaret class (MSW only so far)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2547 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-05-23 23:48:12 +00:00
parent c52d95b412
commit 789295bf7b
21 changed files with 746 additions and 292 deletions

View File

@@ -53,6 +53,10 @@
#include "wx/tooltip.h"
#endif // wxUSE_TOOLTIPS
#if wxUSE_CARET
#include "wx/caret.h"
#endif // wxUSE_CARET
// ----------------------------------------------------------------------------
// static data
// ----------------------------------------------------------------------------
@@ -136,6 +140,10 @@ void wxWindowBase::InitBase()
#if wxUSE_TOOLTIPS
m_tooltip = (wxToolTip *)NULL;
#endif // wxUSE_TOOLTIPS
#if wxUSE_CARET
m_caret = (wxCaret *)NULL;
#endif // wxUSE_CARET
}
// common part of window creation process
@@ -181,6 +189,11 @@ wxWindowBase::~wxWindowBase()
wxASSERT_MSG( GetChildren().GetCount() == 0, _T("children not destroyed") );
#if wxUSE_CARET
if ( m_caret )
delete m_caret;
#endif // wxUSE_CARET
if ( m_windowValidator )
delete m_windowValidator;
@@ -512,6 +525,24 @@ bool wxWindowBase::SetFont(const wxFont& font)
return TRUE;
}
#if wxUSE_CARET
void wxWindowBase::SetCaret(wxCaret *caret)
{
if ( m_caret )
{
delete m_caret;
}
m_caret = caret;
if ( m_caret )
{
wxASSERT_MSG( m_caret->GetWindow() == this,
"caret should be created associated to this window" );
}
}
#endif // wxUSE_CARET
// ----------------------------------------------------------------------------
// validators
// ----------------------------------------------------------------------------