]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/stc/ScintillaWX.cpp
change MSW libs directories so that libraries are shared by builds
[wxWidgets.git] / contrib / src / stc / ScintillaWX.cpp
index 059dd4afaae05a5d43f6a991792d3eeffd47bee8..3e5ebf0aa601b080725de47a78aae96f1b384435 100644 (file)
@@ -16,6 +16,7 @@
 
 
 #include "ScintillaWX.h"
+#include "ExternalLexer.h"
 #include "wx/stc/stc.h"
 #include "PlatWX.h"
 
@@ -337,12 +338,7 @@ void ScintillaWX::Copy() {
     if (currentPos != anchor) {
         SelectionText st;
         CopySelectionRange(&st);
-        if (wxTheClipboard->Open()) {
-            wxTheClipboard->UsePrimarySelection(FALSE);
-            wxString text = stc2wx(st.s, st.len);
-            wxTheClipboard->SetData(new wxTextDataObject(text));
-            wxTheClipboard->Close();
-        }
+        CopyToClipboard(st);
     }
 }
 
@@ -372,6 +368,16 @@ void ScintillaWX::Paste() {
 }
 
 
+void ScintillaWX::CopyToClipboard(const SelectionText& st) {
+    if (wxTheClipboard->Open()) {
+        wxTheClipboard->UsePrimarySelection(FALSE);
+        wxString text = stc2wx(st.s, st.len);
+        wxTheClipboard->SetData(new wxTextDataObject(text));
+        wxTheClipboard->Close();
+    }
+}
+
+
 bool ScintillaWX::CanPaste() {
     bool canPaste = FALSE;
     bool didOpen;
@@ -474,6 +480,11 @@ long ScintillaWX::WndProc(unsigned int iMessage, unsigned long wParam, long lPar
           break;
       }
 
+#ifdef SCI_LEXER
+       case SCI_LOADLEXERLIBRARY:
+            LexerManager::GetInstance()->Load((const char*)lParam);
+            break;
+#endif
       default:
           return ScintillaBase::WndProc(iMessage, wParam, lParam);
       }