From ee0a99a85f0e8c01e44422c4bc2c81fce7ee7e5e Mon Sep 17 00:00:00 2001 From: Felix Domke Date: Fri, 20 May 2005 19:34:06 +0000 Subject: - split einput contents to own files - add string input --- lib/gui/einputstring.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 lib/gui/einputstring.h (limited to 'lib/gui/einputstring.h') diff --git a/lib/gui/einputstring.h b/lib/gui/einputstring.h new file mode 100644 index 00000000..a4eb52af --- /dev/null +++ b/lib/gui/einputstring.h @@ -0,0 +1,31 @@ +#ifndef __lib_gui_einputstring_h +#define __lib_gui_einputstring_h + +#include + +class eInputContentString: public eInputContent +{ + DECLARE_REF(eInputContentString); +public: + eInputContentString(); + + void getDisplay(std::string &res, int &cursor); + void moveCursor(int dir); + int haveKey(int code, int overwrite); + void deleteChar(int dir); + int isValid(); + + void validate(); + + void setText(const std::string &text); + std::string getText(); + +private: + void insertChar(int pos, int ch); + + std::string m_string; + + int m_cursor, m_len; +}; + +#endif -- cgit v1.2.3