]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/textctrl.cpp
implemented 'shaft scrolling' of children in wxUnivWindow::ScrollWindow
[wxWidgets.git] / src / motif / textctrl.cpp
index fe48ec22b6de1f8f80273c0d03bff4b2e8b27c15..fe72b88437e85d413dfc78b1c84ada12432144cd 100644 (file)
     #pragma implementation "textctrl.h"
 #endif
 
+#ifdef __VMS
+#define XtParent XTPARENT
+#endif
+
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fstream.h>
@@ -57,7 +61,6 @@ static void wxTextWindowGainFocusProc(Widget w, XtPointer clientData, XmAnyCallb
 static void wxTextWindowLoseFocusProc(Widget w, XtPointer clientData, XmAnyCallbackStruct *cbs);
 static void wxTextWindowActivateProc(Widget w, XtPointer clientData, XmAnyCallbackStruct *ptr);
 
-#if !USE_SHARED_LIBRARY
     IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxControl)
 
     BEGIN_EVENT_TABLE(wxTextCtrl, wxControl)
@@ -77,7 +80,6 @@ static void wxTextWindowActivateProc(Widget w, XtPointer clientData, XmAnyCallba
     EVT_UPDATE_UI(wxID_REDO, wxTextCtrl::OnUpdateRedo)
 
     END_EVENT_TABLE()
-#endif
 
 // ============================================================================
 // implementation
@@ -302,7 +304,7 @@ bool wxTextCtrl::CanCut() const
     // Can cut if there's a selection
     long from, to;
     GetSelection(& from, & to);
-    return (from != to) ;
+    return (from != to) && (IsEditable());
 }
 
 bool wxTextCtrl::CanPaste() const
@@ -663,7 +665,7 @@ void wxTextCtrl::ChangeBackgroundColour()
             XmNhorizontalScrollBar, &hsb,
             XmNverticalScrollBar, &vsb,
             NULL);
-        wxColour backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE);
+        wxColour backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
         if (hsb)
             DoChangeBackgroundColour((WXWidget) hsb, backgroundColour, TRUE);
         if (vsb)