summaryrefslogtreecommitdiffstats
path: root/Source/CursesDialog/cmCursesStringWidget.cxx
diff options
context:
space:
mode:
authorBerk Geveci <berk.geveci@kitware.com>2001-12-04 16:16:04 (GMT)
committerBerk Geveci <berk.geveci@kitware.com>2001-12-04 16:16:04 (GMT)
commitd42ded5b166b37d29c9837c5f3e0bceaa661c5ba (patch)
tree4eaec928dec9f555fca4067f3d85ddac8f5ba4ce /Source/CursesDialog/cmCursesStringWidget.cxx
parentcb4f04c94e5815393e9b1d765588c23656149b4e (diff)
downloadCMake-d42ded5b166b37d29c9837c5f3e0bceaa661c5ba.zip
CMake-d42ded5b166b37d29c9837c5f3e0bceaa661c5ba.tar.gz
CMake-d42ded5b166b37d29c9837c5f3e0bceaa661c5ba.tar.bz2
Added debugging.
Diffstat (limited to 'Source/CursesDialog/cmCursesStringWidget.cxx')
-rw-r--r--Source/CursesDialog/cmCursesStringWidget.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/CursesDialog/cmCursesStringWidget.cxx b/Source/CursesDialog/cmCursesStringWidget.cxx
index 2bc39d8..8273fdf 100644
--- a/Source/CursesDialog/cmCursesStringWidget.cxx
+++ b/Source/CursesDialog/cmCursesStringWidget.cxx
@@ -1,4 +1,6 @@
#include "cmCursesStringWidget.h"
+#include "cmCursesForm.h"
+
inline int ctrl(int z)
{
return (z&037);
@@ -26,9 +28,13 @@ bool cmCursesStringWidget::HandleInput(int& key, FORM* form, WINDOW* w)
char* originalStr=0;
+ char debugMessage[128];
+
// <Enter> is used to change edit mode (like <Esc> in vi).
while(1)
{
+ sprintf(debugMessage, "String widget handling input, key: %d", key);
+ cmCursesForm::LogMessage(debugMessage);
// If resize occured during edit, move out of edit mode
if (!m_InEdit && ( key != 10 && key != KEY_ENTER ) )
{
@@ -39,6 +45,7 @@ bool cmCursesStringWidget::HandleInput(int& key, FORM* form, WINDOW* w)
{
if (m_InEdit)
{
+ cmCursesForm::LogMessage("String widget leaving edit.");
m_InEdit = false;
delete[] originalStr;
// trick to force forms to update the field buffer
@@ -48,6 +55,7 @@ bool cmCursesStringWidget::HandleInput(int& key, FORM* form, WINDOW* w)
}
else
{
+ cmCursesForm::LogMessage("String widget entering edit.");
m_InEdit = true;
char* buf = field_buffer(m_Field, 0);
originalStr = new char[strlen(buf)+1];