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( wxKeyEvent& )> onAcceptHandler =
41 []( wxKeyEvent& aEvent )
43 std::function<void( wxStyledTextEvent& )> onCharAddedHandler =
44 []( wxStyledTextEvent& )
50 const std::function<
void(
const wxString& xRef, wxArrayString* tokens )>& getTokensFn );
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 onChar(wxStyledTextEvent &aEvent)
int firstNonWhitespace(int aLine, int *aWhitespaceCount=nullptr)
virtual void onCharHook(wxKeyEvent &aEvent)
wxStyledTextCtrl * Scintilla() const
std::function< void(wxKeyEvent &aEvent)> m_onAcceptFn
void onThemeChanged(wxSysColourChangedEvent &aEvent)
void DoAutocomplete(const wxString &aPartial, const wxArrayString &aTokens)
bool m_suppressAutocomplete
void CancelAutocomplete()
void onScintillaUpdateUI(wxStyledTextEvent &aEvent)
void DoTextVarAutocomplete(const std::function< void(const wxString &xRef, wxArrayString *tokens)> &getTokensFn)
std::function< void(wxStyledTextEvent &aEvent)> m_onCharAddedFn
void onModified(wxStyledTextEvent &aEvent)