summaryrefslogtreecommitdiffstats
path: root/Source/CursesDialog/cmCursesStringWidget.h
diff options
context:
space:
mode:
authorBerk Geveci <berk.geveci@kitware.com>2001-11-04 23:05:21 (GMT)
committerBerk Geveci <berk.geveci@kitware.com>2001-11-04 23:05:21 (GMT)
commit939d614978ff6772aae619bfbc3ef89e27b69f73 (patch)
tree0b6d52df9911a29a10d25afc7650cf7a1c5ba2f1 /Source/CursesDialog/cmCursesStringWidget.h
parentef74458b34dcf2d25b3948c535d59273c2307546 (diff)
downloadCMake-939d614978ff6772aae619bfbc3ef89e27b69f73.zip
CMake-939d614978ff6772aae619bfbc3ef89e27b69f73.tar.gz
CMake-939d614978ff6772aae619bfbc3ef89e27b69f73.tar.bz2
Adding curses support.
Diffstat (limited to 'Source/CursesDialog/cmCursesStringWidget.h')
-rw-r--r--Source/CursesDialog/cmCursesStringWidget.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/Source/CursesDialog/cmCursesStringWidget.h b/Source/CursesDialog/cmCursesStringWidget.h
new file mode 100644
index 0000000..29fb281
--- /dev/null
+++ b/Source/CursesDialog/cmCursesStringWidget.h
@@ -0,0 +1,39 @@
+#ifndef __cmCursesStringWidget_h
+#define __cmCursesStringWidget_h
+
+#include "cmCursesWidget.h"
+
+class cmCursesStringWidget : public cmCursesWidget
+{
+public:
+ cmCursesStringWidget(int width, int height, int left, int top);
+
+ // Description:
+ // Handle user input. Called by the container of this widget
+ // when this widget has focus. Returns true if the input was
+ // handled.
+ virtual bool HandleInput(int& key, FORM* form, WINDOW* w);
+
+ // Description:
+ // Set/Get the string.
+ void SetString(const char* value);
+ const char* GetString();
+ virtual const char* GetValue();
+
+ // Description:
+ // Set/Get InEdit flag. Can be used to tell the widget to leave
+ // edit mode (in case of a resize for example).
+ void SetInEdit(bool inedit)
+ { m_InEdit = inedit; }
+ bool GetInEdit()
+ { return m_InEdit; }
+
+protected:
+ cmCursesStringWidget(const cmCursesStringWidget& from);
+ void operator=(const cmCursesStringWidget&);
+
+ // true if the widget is in edit mode
+ bool m_InEdit;
+};
+
+#endif // __cmCursesStringWidget_h