]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/textentrycmn.cpp
document On{Open,Save}Document()
[wxWidgets.git] / src / common / textentrycmn.cpp
index 7324f6194c8ed8cded8842352b209c8eefb3dfc3..c6b769601e4256fe2863a0afcb8c347c5b32a15c 100644 (file)
@@ -80,6 +80,14 @@ bool wxTextEntryBase::HasSelection() const
     return from < to;
 }
 
+void wxTextEntryBase::RemoveSelection()
+{
+    long from, to;
+    GetSelection(& from, & to);
+    if (from != -1 && to != -1)
+        Remove(from, to);
+}
+
 wxString wxTextEntryBase::GetStringSelection() const
 {
     long from, to;
@@ -104,8 +112,14 @@ bool wxTextEntryBase::CanPaste() const
     {
 #if wxUSE_CLIPBOARD
         // check if there is any text on the clipboard
-        if ( wxTheClipboard->IsSupported(wxDF_TEXT) )
+        if ( wxTheClipboard->IsSupported(wxDF_TEXT)
+#if wxUSE_UNICODE
+                || wxTheClipboard->IsSupported(wxDF_UNICODETEXT)
+#endif // wxUSE_UNICODE
+           )
+        {
             return true;
+        }
 #endif // wxUSE_CLIPBOARD
     }