X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/85047589a993f5c5529e1dae284be8af84cd68ef..d50fc4dc6d4832d4678c6e99085198cafaeabb9a:/include/wx/textcompleter.h diff --git a/include/wx/textcompleter.h b/include/wx/textcompleter.h index 2e084c9e03..7e9dd83b6f 100644 --- a/include/wx/textcompleter.h +++ b/include/wx/textcompleter.h @@ -55,5 +55,33 @@ private: wxDECLARE_NO_COPY_CLASS(wxTextCompleterSimple); }; +// ---------------------------------------------------------------------------- +// wxTextCompleterFixed: Trivial wxTextCompleter implementation which always +// returns the same fixed array of completions. +// ---------------------------------------------------------------------------- + +// NB: This class is private and intentionally not documented as it is +// currently used only for implementation of completion with the fixed list +// of strings only by wxWidgets itself, do not use it outside of wxWidgets. + +class wxTextCompleterFixed : public wxTextCompleterSimple +{ +public: + void SetCompletions(const wxArrayString& strings) + { + m_strings = strings; + } + + virtual void GetCompletions(const wxString& WXUNUSED(prefix), + wxArrayString& res) + { + res = m_strings; + } + +private: + wxArrayString m_strings; +}; + + #endif // _WX_TEXTCOMPLETER_H_