36#ifndef AUTOCOMPLETEPOPUP_H
37#define AUTOCOMPLETEPOPUP_H
43#include <wx/listctrl.h>
49 wxWindow *GetControl()
override {
return this; }
52 void SetStringValue(
const wxString& s)
override
54 int n = wxListView::FindItem(-1, s);
55 if (n >= 0 && n < wxListView::GetItemCount() )
56 wxListView::Select(n);
59 wxString GetStringValue()
const override
60 {
return (m_value >= 0) ? wxListView::GetItemText(m_value) : wxString(); }
63 struct DonePtr {
AutocompletePopup*& observer; ~DonePtr() { observer =
nullptr; } };
68 wxWindow *m_parent = {};
69 const DonePtr m_doneptr;
70 std::vector<wxString> m_completions;
84 bool Create(wxWindow* parent)
override;
87 void OnChar(wxKeyEvent &event);
102 void UpdateResults();
104 void OnClick(wxMouseEvent &event);
This file declares the class AutoComplete.
This file contains the definition of the class EditorCell.
Definition: Autocomplete.h:60
autoCompletionType
All types of things we can autocomplete.
Definition: Autocomplete.h:67
This class defines what the user sees as input cell.
Definition: EditorCell.h:59