X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/455f7c8205e5dc29d99026b158ae0a394dccc839..b5ec0c78b521cfa0f276e4d5d830f35b4fa26e91:/src/motif/textctrl.cpp diff --git a/src/motif/textctrl.cpp b/src/motif/textctrl.cpp index 666da47caa..03514e834d 100644 --- a/src/motif/textctrl.cpp +++ b/src/motif/textctrl.cpp @@ -59,8 +59,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); - IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxTextCtrlBase) - BEGIN_EVENT_TABLE(wxTextCtrl, wxTextCtrlBase) EVT_DROP_FILES(wxTextCtrl::OnDropFiles) EVT_CHAR(wxTextCtrl::OnChar) @@ -90,7 +88,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; } @@ -108,7 +106,7 @@ bool wxTextCtrl::Create(wxWindow *parent, return false; PreCreation(); - m_tempCallbackStruct = (void*) NULL; + m_tempCallbackStruct = NULL; m_modified = false; m_processedDefault = false; @@ -163,7 +161,7 @@ bool wxTextCtrl::Create(wxWindow *parent, #if 0 // TODO: Is this relevant? What does it do? int noCols = 2; - if (!value.IsNull() && (value.length() > (unsigned int) noCols)) + if (!value.empty() && (value.length() > (unsigned int) noCols)) noCols = value.length(); XtVaSetValues((Widget) m_mainWidget, XmNcolumns, noCols, @@ -387,7 +385,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); } @@ -472,7 +470,7 @@ void wxTextCtrl::DoSendEvents(void *wxcbs, long keycode) if ( !InSetValue() && m_processedDefault ) { // Can generate a command - wxCommandEvent commandEvent(wxEVT_COMMAND_TEXT_UPDATED, GetId()); + wxCommandEvent commandEvent(wxEVT_TEXT, GetId()); commandEvent.SetEventObject(this); ProcessCommand(commandEvent); } @@ -689,7 +687,7 @@ static void wxTextWindowActivateProc(Widget w, XtPointer clientData, if (tw->InSetValue()) return; - wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER); + wxCommandEvent event(wxEVT_TEXT_ENTER); event.SetId(tw->GetId()); event.SetEventObject(tw); tw->ProcessCommand(event);