+bool wxTextCtrlBase::CanPaste() const
+{
+ // can paste if we are not read only
+ return IsEditable();
+}
+
+// ----------------------------------------------------------------------------
+// misc
+// ----------------------------------------------------------------------------
+
+void wxTextCtrlBase::SelectAll()
+{
+ SetSelection(0, GetLastPosition());
+}
+
+wxString wxTextCtrlBase::GetStringSelection() const
+{
+ long from, to;
+ GetSelection(&from, &to);
+
+ wxString sel;
+ if ( from < to )
+ {
+ sel = GetValue().Mid(from, to - from);
+ }
+
+ return sel;
+}
+
+#else // !wxUSE_TEXTCTRL
+
+// define this one even if !wxUSE_TEXTCTRL because it is also used by other
+// controls (wxComboBox and wxSpinCtrl)
+#include "wx/event.h"
+
+DEFINE_EVENT_TYPE(wxEVT_COMMAND_TEXT_UPDATED)
+
+#endif // wxUSE_TEXTCTRL/!wxUSE_TEXTCTRL