refactor wxMSW code to extract parts common to wxTextCtrl and wxComboBox into wxTextEntry

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48952 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-09-26 16:48:46 +00:00
parent d6b9cc87c0
commit fa2f57be4d
9 changed files with 340 additions and 512 deletions

View File

@@ -29,6 +29,7 @@
#endif //WX_PRECOMP
#include "wx/textentry.h"
#include "wx/clipbrd.h"
// ============================================================================
// wxTextEntryBase implementation
@@ -97,7 +98,16 @@ bool wxTextEntryBase::CanCut() const
bool wxTextEntryBase::CanPaste() const
{
return IsEditable();
if ( IsEditable() )
{
#if wxUSE_CLIPBOARD
// check if there is any text on the clipboard
if ( wxTheClipboard->IsSupported(wxDF_TEXT) )
return true;
#endif // wxUSE_CLIPBOARD
}
return false;
}
#endif // wxUSE_TEXTCTRL || wxUSE_COMBOBOX