[apps/code] Load builtins according to autocompleted text

This commit is contained in:
Léa Saviot
2020-03-26 15:04:38 +01:00
committed by Émilie Feral
parent 1599b16e03
commit f412d95584
8 changed files with 186 additions and 131 deletions

View File

@@ -18,7 +18,7 @@ public:
void unloadSyntaxHighlighter() { m_contentView.unloadSyntaxHighlighter(); }
bool handleEvent(Ion::Events::Event event) override;
bool handleEventWithText(const char * text, bool indentation = false, bool forceCursorRightOfText = false) override;
const char * textToAutocomplete() const;
const char * textToAutocomplete(int * length = nullptr) const;
protected:
class ContentView : public TextArea::ContentView {
public:
@@ -31,7 +31,7 @@ protected:
App * pythonDelegate() { return m_pythonDelegate; }
void setAutocompleting(bool autocomplete) { m_autocomplete = autocomplete; }
bool isAutocompleting() const { return m_autocomplete; }
const char * textToAutocomplete() const;
const char * textToAutocomplete(int * length = nullptr) const;
void loadSyntaxHighlighter();
void unloadSyntaxHighlighter();
void clearRect(KDContext * ctx, KDRect rect) const override;