From 0d2bd5e004b657be9bd66e26161f1cf7299707ea Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sun, 17 Jun 2012 13:38:21 +1000 Subject: Use std::string instead of fixed size strings. Decrease direct access to the autocompletion list box from outside AutoComplete. --- src/AutoComplete.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/AutoComplete.h') diff --git a/src/AutoComplete.h b/src/AutoComplete.h index 19a1271ac..91e084857 100644 --- a/src/AutoComplete.h +++ b/src/AutoComplete.h @@ -20,8 +20,10 @@ class AutoComplete { char fillUpChars[256]; char separator; char typesep; // Type seperator + enum { maxItemLen=1000 }; public: + bool ignoreCase; bool chooseSingle; ListBox *lb; @@ -61,6 +63,12 @@ public: /// The list string contains a sequence of words separated by the separator character void SetList(const char *list); + + /// Return the position of the currently selected list item + int GetSelection() const; + + /// Return the value of an item in the list + std::string GetValue(int item) const; void Show(bool show); void Cancel(); -- cgit v1.2.3