24#ifndef SCINTILLA_TRICKS_H
25#define SCINTILLA_TRICKS_H
28#include <wx/stc/stc.h>
39 SCINTILLA_TRICKS( wxStyledTextCtrl* aScintilla,
const wxString& aBraces,
bool aSingleLine,
40 std::function<
void()> onAcceptHandler =
43 std::function<void( wxStyledTextEvent& )> onCharAddedHandler =
44 []( wxStyledTextEvent& )
50 wxArrayString* tokens )> aTokenProvider );
52 void DoAutocomplete(
const wxString& aPartial,
const wxArrayString& aTokens );
62 void onChar( wxStyledTextEvent& aEvent );
Add cut/copy/paste, dark theme, autocomplete and brace highlighting to a wxStyleTextCtrl instance.
void DoTextVarAutocomplete(std::function< void(const wxString &crossRef, wxArrayString *tokens)> aTokenProvider)
void onChar(wxStyledTextEvent &aEvent)
int firstNonWhitespace(int aLine, int *aWhitespaceCount=nullptr)
void onCharHook(wxKeyEvent &aEvent)
wxStyledTextCtrl * Scintilla() const
void onThemeChanged(wxSysColourChangedEvent &aEvent)
void DoAutocomplete(const wxString &aPartial, const wxArrayString &aTokens)
bool m_suppressAutocomplete
void CancelAutocomplete()
void onScintillaUpdateUI(wxStyledTextEvent &aEvent)
std::function< void()> m_onAcceptHandler
std::function< void(wxStyledTextEvent &aEvent)> m_onCharAddedHandler