+// ----------------------------------------------------------------------------
+// clipboard stuff
+// ----------------------------------------------------------------------------
+
+bool wxTextCtrlBase::CanCopy() const
+{
+ // can copy if there's a selection
+ long from, to;
+ GetSelection(&from, &to);
+ return from != to;
+}
+
+bool wxTextCtrlBase::CanCut() const
+{
+ // can cut if there's a selection and if we're not read only
+ return CanCopy() && IsEditable();
+}
+
+bool wxTextCtrlBase::CanPaste() const
+{
+ // can paste if we are not read only
+ return IsEditable();
+}
+
+// ----------------------------------------------------------------------------
+// misc
+// ----------------------------------------------------------------------------
+
+void wxTextCtrlBase::SelectAll()
+{
+ SetSelection(0, GetLastPosition());
+}
+
+#endif // wxUSE_TEXTCTRL
+