diff options
Diffstat (limited to 'mg_incremental_search.h')
-rw-r--r-- | mg_incremental_search.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/mg_incremental_search.h b/mg_incremental_search.h new file mode 100644 index 0000000..e125577 --- /dev/null +++ b/mg_incremental_search.h @@ -0,0 +1,36 @@ +/*! \file mg_incremental_search.h + * \ingroup muggle + * \brief A class that encapsulates incremental search + * + * \version $Revision: $ + * \date $Date: $ + * \author Lars von Wedel + * \author file owner: $Author: $ + * + */ + +/* makes sure we don't use the same declarations twice */ +#ifndef _MUGGLE_INCSEARCH_H +#define _MUGGLE_INCSEARCH_H + +#include <string> +#include <sys/time.h> + +class mgIncrementalSearch +{ + public: + mgIncrementalSearch(); + + std::string KeyStroke( unsigned key ); + + std::string Backspace(); + + private: + std::string m_buffer; + int m_position; + unsigned m_repeats, m_last_key; + + double m_last_keypress; +}; + +#endif |