![]() |
KiCad PCB EDA Suite
|
Add cut/copy/paste, dark theme, autocomplete and brace highlighting to a wxStyleTextCtrl instance. More...
#include <scintilla_tricks.h>
Public Member Functions | |
SCINTILLA_TRICKS (wxStyledTextCtrl *aScintilla, const wxString &aBraces, bool aSingleLine, std::function< void()> m_enterCallback=[](){ }) | |
void | DoAutocomplete (const wxString &aPartial, const wxArrayString &aTokens) |
void | CancelAutocomplete () |
Protected Member Functions | |
void | setupStyles () |
int | firstNonWhitespace (int aLine, int *aWhitespaceCount=nullptr) |
void | onCharHook (wxKeyEvent &aEvent) |
void | onScintillaUpdateUI (wxStyledTextEvent &aEvent) |
void | onThemeChanged (wxSysColourChangedEvent &aEvent) |
Protected Attributes | |
wxStyledTextCtrl * | m_te |
wxString | m_braces |
int | m_lastCaretPos |
int | m_lastSelStart |
int | m_lastSelEnd |
bool | m_suppressAutocomplete |
bool | m_singleLine |
std::function< void()> | m_returnCallback |
Add cut/copy/paste, dark theme, autocomplete and brace highlighting to a wxStyleTextCtrl instance.
Definition at line 35 of file scintilla_tricks.h.
SCINTILLA_TRICKS::SCINTILLA_TRICKS | ( | wxStyledTextCtrl * | aScintilla, |
const wxString & | aBraces, | ||
bool | aSingleLine, | ||
std::function< void()> | m_enterCallback = [](){ } |
||
) |
Definition at line 35 of file scintilla_tricks.cpp.
References m_braces, m_te, onCharHook(), onScintillaUpdateUI(), onThemeChanged(), and setupStyles().
void SCINTILLA_TRICKS::CancelAutocomplete | ( | ) |
Definition at line 414 of file scintilla_tricks.cpp.
References m_te.
Referenced by DIALOG_TEXT_AND_LABEL_PROPERTIES::onMultiLineTCLostFocus(), and DIALOG_TEXT_PROPERTIES::onMultiLineTCLostFocus().
void SCINTILLA_TRICKS::DoAutocomplete | ( | const wxString & | aPartial, |
const wxArrayString & | aTokens | ||
) |
Definition at line 385 of file scintilla_tricks.cpp.
References filter, m_suppressAutocomplete, and m_te.
Referenced by PANEL_SETUP_RULES::onScintillaCharAdded(), DIALOG_TEXT_AND_LABEL_PROPERTIES::onScintillaCharAdded(), PROPERTIES_FRAME::onScintillaCharAdded(), and DIALOG_SCH_FIELD_PROPERTIES::onScintillaCharAdded().
|
protected |
|
protected |
Definition at line 154 of file scintilla_tricks.cpp.
References ConvertSmartQuotesAndDashes(), firstNonWhitespace(), isCtrlSlash(), m_returnCallback, m_singleLine, m_suppressAutocomplete, m_te, and setupStyles().
Referenced by SCINTILLA_TRICKS().
|
protected |
Definition at line 333 of file scintilla_tricks.cpp.
References m_braces, m_lastCaretPos, m_lastSelEnd, m_lastSelStart, and m_te.
Referenced by SCINTILLA_TRICKS().
|
protected |
Definition at line 72 of file scintilla_tricks.cpp.
References setupStyles().
Referenced by SCINTILLA_TRICKS().
|
protected |
Definition at line 80 of file scintilla_tricks.cpp.
References dummy(), KIUI::GetMonospacedUIFont(), m_singleLine, m_te, and r.
Referenced by onCharHook(), onThemeChanged(), and SCINTILLA_TRICKS().
|
protected |
Definition at line 57 of file scintilla_tricks.h.
Referenced by onScintillaUpdateUI(), and SCINTILLA_TRICKS().
|
protected |
Definition at line 58 of file scintilla_tricks.h.
Referenced by onScintillaUpdateUI().
|
protected |
Definition at line 60 of file scintilla_tricks.h.
Referenced by onScintillaUpdateUI().
|
protected |
Definition at line 59 of file scintilla_tricks.h.
Referenced by onScintillaUpdateUI().
|
protected |
Definition at line 64 of file scintilla_tricks.h.
Referenced by onCharHook().
|
protected |
Definition at line 62 of file scintilla_tricks.h.
Referenced by onCharHook(), and setupStyles().
|
protected |
Definition at line 61 of file scintilla_tricks.h.
Referenced by DoAutocomplete(), and onCharHook().
|
protected |
Definition at line 56 of file scintilla_tricks.h.
Referenced by CancelAutocomplete(), DoAutocomplete(), firstNonWhitespace(), onCharHook(), onScintillaUpdateUI(), SCINTILLA_TRICKS(), and setupStyles().