#include "wx/cmdproc.h"
-// turn extra wxTextCtrl-specific debugging on/off
-#define WXDEBUG_TEXT
+#if wxDEBUG_LEVEL >= 2
+ // turn extra wxTextCtrl-specific debugging on/off
+ #define WXDEBUG_TEXT
-// turn wxTextCtrl::Replace() debugging on (slows down code a *lot*!)
-#define WXDEBUG_TEXT_REPLACE
-
-#ifndef __WXDEBUG__
- #undef WXDEBUG_TEXT
- #undef WXDEBUG_TEXT_REPLACE
-#endif
+ // turn wxTextCtrl::Replace() debugging on (slows down code a *lot*!)
+ #define WXDEBUG_TEXT_REPLACE
+#endif // wxDEBUG_LEVEL >= 2
// wxStringTokenize only needed for debug checks
#ifdef WXDEBUG_TEXT_REPLACE
return MData().m_lines.GetCount();
}
-wxString wxTextCtrl::GetValue() const
+wxString wxTextCtrl::DoGetValue() const
{
// for multiline controls we don't always store the total value but only
// recompute it when asked - and to invalidate it we just empty it in
else
{
// read only controls don't have the caret
- caret = (wxCaret *)NULL;
+ caret = NULL;
}
// SetCaret() will delete the old caret if any
// the command this action corresponds to or NULL if this action doesn't
// change text at all or can't be undone
- wxTextCtrlCommand *command = (wxTextCtrlCommand *)NULL;
+ wxTextCtrlCommand *command = NULL;
wxString action;
bool del = false,
}
#endif
}
-#ifdef __WXDEBUG__
+#if wxDEBUG_LEVEL >= 2
// Ctrl-R refreshes the control in debug mode
else if ( event.ControlDown() && event.GetKeyCode() == 'r' )
Refresh();
-#endif // __WXDEBUG__
+#endif // wxDEBUG_LEVEL >= 2
event.Skip();
}
wxStdTextCtrlInputHandler::wxStdTextCtrlInputHandler(wxInputHandler *inphand)
: wxStdInputHandler(inphand)
{
- m_winCapture = (wxTextCtrl *)NULL;
+ m_winCapture = NULL;
}
/* static */
m_winCapture->ShowCaret();
m_winCapture->ReleaseMouse();
- m_winCapture = (wxTextCtrl *)NULL;
+ m_winCapture = NULL;
}
}