summaryrefslogtreecommitdiff
path: root/mg_incremental_search.h
diff options
context:
space:
mode:
authorLarsAC <LarsAC@e10066b5-e1e2-0310-b819-94efdf66514b>2005-04-18 22:13:46 +0000
committerLarsAC <LarsAC@e10066b5-e1e2-0310-b819-94efdf66514b>2005-04-18 22:13:46 +0000
commitdad945869843ca2f0dd5e287a223b051b96988d7 (patch)
treef9f74907a9b5f94c8c7d1f1edcaa2d0990dc2c8d /mg_incremental_search.h
parent2a05059136753bd6a2c7007b2284b4d1688b7c3f (diff)
downloadvdr-plugin-muggle-dad945869843ca2f0dd5e287a223b051b96988d7.tar.gz
vdr-plugin-muggle-dad945869843ca2f0dd5e287a223b051b96988d7.tar.bz2
Added incremental search
git-svn-id: https://vdr-muggle.svn.sourceforge.net/svnroot/vdr-muggle/branches/0.1.6-wr@631 e10066b5-e1e2-0310-b819-94efdf66514b
Diffstat (limited to 'mg_incremental_search.h')
-rw-r--r--mg_incremental_search.h36
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