// Author: Wlodzimierz ABX Skiba
// Modified by:
// Created: 30.08.2004
-// RCS-ID: $Id$
// Copyright: (c) Wlodzimierz Skiba
-// License: wxWindows licence
+// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
// ============================================================================
// event tables and other macros
// ----------------------------------------------------------------------------
-#if wxUSE_EXTENDED_RTTI
-// TODO
-#else
-IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxControl)
-#endif
-
BEGIN_EVENT_TABLE(wxTextCtrl, wxControl)
EVT_CHAR(wxTextCtrl::OnChar)
sizeText.x -= sizeBtn.x + MARGIN_BETWEEN;
if ( sizeText.x <= 0 )
{
- wxLogDebug(_T("not enough space for wxSpinCtrl!"));
+ wxLogDebug(wxT("not enough space for wxSpinCtrl!"));
}
wxPoint posBtn(pos);
m_hwndBuddy = (WXHWND)::CreateWindowEx
(
exStyle, // sunken border
- _T("EDIT"), // window class
+ wxT("EDIT"), // window class
valueWin, // no window title
msStyle, // style (will be shown later)
pos.x, pos.y, // position
if ( style & wxSP_WRAP )
spiner_style |= UDS_WRAP;
- if ( !MSWCreateControl(UPDOWN_CLASS, spiner_style, posBtn, sizeBtn, _T(""), 0) )
+ if ( !MSWCreateControl(UPDOWN_CLASS, spiner_style, posBtn, sizeBtn, wxT(""), 0) )
return false;
// subclass the text ctrl to be able to intercept some events
sizeText.y = EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy);
}
- SetBestSize(size);
+ SetInitialSize(size);
(void)::ShowWindow(GetBuddyHwnd(), SW_SHOW);
(void)::SendMessage(GetHwnd(), UDM_SETBUDDY, (WPARAM)GetBuddyHwnd(), 0);
// do it after finishing with m_hwndBuddy creation to avoid generating
- // initial wxEVT_COMMAND_TEXT_UPDATED message
+ // initial wxEVT_TEXT message
ms_allTextSpins.Add(this);
return true;
// remove the '\n' at the end, if any (this is how this function is
// supposed to work according to the docs)
- if ( buf[len - 1] == _T('\n') )
+ if ( buf[len - 1] == wxT('\n') )
{
len--;
}
case WXK_RETURN:
if ( !HasFlag(wxTE_MULTILINE) )
{
- wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
+ wxCommandEvent event(wxEVT_TEXT_ENTER, m_windowId);
InitCommandEvent(event);
event.SetString(GetValue());
if ( GetEventHandler()->ProcessEvent(event) )
return false;
}
- wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, GetId());
+ wxCommandEvent event(wxEVT_TEXT, GetId());
InitCommandEvent(event);
event.SetString(GetValue());
// the text size limit has been hit -- try to increase it
if ( !AdjustSpaceLimit() )
{
- wxCommandEvent event(wxEVT_COMMAND_TEXT_MAXLEN, m_windowId);
+ wxCommandEvent event(wxEVT_TEXT_MAXLEN, m_windowId);
InitCommandEvent(event);
event.SetString(GetValue());
ProcessCommand(event);
int widthText = width - widthBtn - MARGIN_BETWEEN;
if ( widthText <= 0 )
{
- wxLogDebug(_T("not enough space for wxSpinCtrl!"));
+ wxLogDebug(wxT("not enough space for wxSpinCtrl!"));
}
if ( !::MoveWindow(GetBuddyHwnd(), x, y, widthText, height, TRUE) )