// Author: Julian Smart
// Modified by:
// Created: 17/09/98
-// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// 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>
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)
// Text item
wxTextCtrl::wxTextCtrl()
{
- m_tempCallbackStruct = (void*) NULL;
+ m_tempCallbackStruct = NULL;
m_modified = false;
m_processedDefault = false;
}
return false;
PreCreation();
- m_tempCallbackStruct = (void*) NULL;
+ m_tempCallbackStruct = NULL;
m_modified = false;
m_processedDefault = false;
#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,
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);
}
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);
}
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);