X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ea98f11c2fbcd33ffc9b9771b8046c7353f51fcf..08670ea85abf4b4946a9ce64971b591d7b1ee30b:/src/common/textentrycmn.cpp diff --git a/src/common/textentrycmn.cpp b/src/common/textentrycmn.cpp index 66a0a6452e..5b08496492 100644 --- a/src/common/textentrycmn.cpp +++ b/src/common/textentrycmn.cpp @@ -377,6 +377,23 @@ wxTextCompleter::~wxTextCompleter() { } +bool wxTextCompleterSimple::Start(const wxString& prefix) +{ + m_index = 0; + m_completions.clear(); + GetCompletions(prefix, m_completions); + + return !m_completions.empty(); +} + +wxString wxTextCompleterSimple::GetNext() +{ + if ( m_index == m_completions.size() ) + return wxString(); + + return m_completions[m_index++]; +} + bool wxTextEntryBase::DoAutoCompleteCustom(wxTextCompleter *completer) { // We don't do anything here but we still need to delete the completer for