[apps/code] Handle acception/dismissal of autocompletion

This commit is contained in:
Léa Saviot
2020-03-13 16:41:26 +01:00
committed by Émilie Feral
parent 938e0dd840
commit 5dd4f12ee3
2 changed files with 33 additions and 0 deletions

View File

@@ -16,6 +16,7 @@ public:
}
void loadSyntaxHighlighter() { m_contentView.loadSyntaxHighlighter(); }
void unloadSyntaxHighlighter() { m_contentView.unloadSyntaxHighlighter(); }
bool handleEvent(Ion::Events::Event event) override;
bool handleEventWithText(const char * text, bool indentation = false, bool forceCursorRightOfText = false) override;
protected:
class ContentView : public TextArea::ContentView {
@@ -40,6 +41,7 @@ protected:
private:
void removeAutocompletion();
void addAutocompletion();
void acceptAutocompletion(bool moveCursorToEndOfAutocompletion);
const ContentView * nonEditableContentView() const override { return &m_contentView; }
ContentView m_contentView;
};