diff --git a/src/stc/PlatWX.cpp b/src/stc/PlatWX.cpp index 4d7d368921..1120e41a5c 100644 --- a/src/stc/PlatWX.cpp +++ b/src/stc/PlatWX.cpp @@ -3427,41 +3427,6 @@ void Menu::Show(Point pt, Window &w) { //---------------------------------------------------------------------- -class DynamicLibraryImpl : public DynamicLibrary { -public: - explicit DynamicLibraryImpl(const char *modulePath) - : m_dynlib(wxString::FromUTF8(modulePath), wxDL_LAZY) { - } - - // Use GetSymbol to get a pointer to the relevant function. - virtual Function FindFunction(const char *name) override { - if (m_dynlib.IsLoaded()) { - bool status; - void* fn_address = m_dynlib.GetSymbol(wxString::FromUTF8(name), - &status); - if(status) - return fn_address; - else - return nullptr; - } - else - return nullptr; - } - - virtual bool IsValid() override { - return m_dynlib.IsLoaded(); - } - -private: - wxDynamicLibrary m_dynlib; -}; - -DynamicLibrary *DynamicLibrary::Load(const char *modulePath) { - return static_cast( new DynamicLibraryImpl(modulePath) ); -} - -//---------------------------------------------------------------------- - ColourDesired Platform::Chrome() { wxColour c; c = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE); diff --git a/src/stc/ScintillaWX.cpp b/src/stc/ScintillaWX.cpp index b512501eb9..48f17ee383 100644 --- a/src/stc/ScintillaWX.cpp +++ b/src/stc/ScintillaWX.cpp @@ -39,6 +39,9 @@ #include "wx/stc/private.h" #include "PlatWX.h" +#include "Lexilla.h" +#include "LexillaAccess.h" + #ifdef __WXMSW__ #include "wx/msw/private.h" // GetHwndOf() #endif @@ -796,6 +799,29 @@ sptr_t ScintillaWX::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) return stc->wxControl::MSWWindowProc(iMessage, wParam, lParam); #endif + case SCI_SETLEXER: + { + int lexLanguage = static_cast(wParam); + const char* name = LexerNameFromID(lexLanguage); + ILexer5* pLexer = name ? CreateLexer(name) : nullptr; + stc->SetILexer(pLexer); + break; + } + + case SCI_SETLEXERLANGUAGE: + { + const char* name = ConstCharPtrFromSPtr(lParam); + ILexer5* pLexer = name ? CreateLexer(name) : nullptr; + stc->SetILexer(pLexer); + break; + } + + case SCI_LOADLEXERLIBRARY: + { + Lexilla::Load(ConstCharPtrFromSPtr(lParam)); + break; + } + default: return ScintillaBase::WndProc(iMessage, wParam, lParam); }