]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/textctrl.cpp
Handle the case of NSNotFound result properly.
[wxWidgets.git] / src / motif / textctrl.cpp
index aeafee2200798c6870935fecf4a94c07f478420d..4cd726bc0434eeaed8541f0f60f1e15fd7d43e64 100644 (file)
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
-#ifdef __VMS
-#define XtParent XTPARENT
-#endif
-
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <ctype.h>
@@ -94,7 +90,7 @@ static void wxTextWindowActivateProc(Widget w, XtPointer clientData, XmAnyCallba
 // Text item
 wxTextCtrl::wxTextCtrl()
 {
-    m_tempCallbackStruct = (void*) NULL;
+    m_tempCallbackStruct = NULL;
     m_modified = false;
     m_processedDefault = false;
 }
@@ -112,7 +108,7 @@ bool wxTextCtrl::Create(wxWindow *parent,
         return false;
     PreCreation();
 
-    m_tempCallbackStruct = (void*) NULL;
+    m_tempCallbackStruct = NULL;
     m_modified = false;
     m_processedDefault = false;
 
@@ -391,7 +387,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
         XmTextVerifyCallbackStruct *textStruct =
             (XmTextVerifyCallbackStruct *) m_tempCallbackStruct;
         textStruct->doit = True;
-        if (isascii(event.m_keyCode) && (textStruct->text->length == 1))
+        if (wxIsascii(event.m_keyCode) && (textStruct->text->length == 1))
         {
             textStruct->text->ptr[0] = (char)((event.m_keyCode == WXK_RETURN) ? 10 : event.m_keyCode);
         }
@@ -471,7 +467,7 @@ void wxTextCtrl::DoSendEvents(void *wxcbs, long keycode)
     // the character passed through)
     cbs->doit = False;
 
-    GetEventHandler()->ProcessEvent(event);
+    HandleWindowEvent(event);
 
     if ( !InSetValue() && m_processedDefault )
     {
@@ -667,7 +663,7 @@ wxTextWindowGainFocusProc (Widget w, XtPointer clientData, XmAnyCallbackStruct *
     wxTextCtrl *tw = (wxTextCtrl *) clientData;
     wxFocusEvent event(wxEVT_SET_FOCUS, tw->GetId());
     event.SetEventObject(tw);
-    tw->GetEventHandler()->ProcessEvent(event);
+    tw->HandleWindowEvent(event);
 }
 
 static void
@@ -679,7 +675,7 @@ wxTextWindowLoseFocusProc (Widget w, XtPointer clientData, XmAnyCallbackStruct *
     wxTextCtrl *tw = (wxTextCtrl *) clientData;
     wxFocusEvent event(wxEVT_KILL_FOCUS, tw->GetId());
     event.SetEventObject(tw);
-    tw->GetEventHandler()->ProcessEvent(event);
+    tw->HandleWindowEvent(event);
 }
 
 static void wxTextWindowActivateProc(Widget w, XtPointer clientData,