]> git.saurik.com Git - wxWidgets.git/blobdiff - src/stc/stc.cpp.in
show the standard wxWin fonts (modified patch 530698)
[wxWidgets.git] / src / stc / stc.cpp.in
index b3a666d8655aa9b528ce9101548473beb636eb35..68346399e98e2f2439c847b475161611d6a11b5b 100644 (file)
 
 #include <wx/tokenzr.h>
 
-// The following code forces a reference to all of the Scintilla lexers.
-// If we don't do something like this, then the linker tends to "optimize"
-// them away. (eric@sourcegear.com)
-
-int wxForceScintillaLexers(void)
-{
-  extern LexerModule lmAda;
-  extern LexerModule lmAVE;
-  extern LexerModule lmConf;
-  extern LexerModule lmCPP;
-  extern LexerModule lmNncrontab;
-  extern LexerModule lmEiffel;
-  extern LexerModule lmHTML;
-  extern LexerModule lmLISP;
-  extern LexerModule lmLua;
-  extern LexerModule lmBatch;  // In LexOthers.cxx
-  extern LexerModule lmPascal;
-  extern LexerModule lmPerl;
-  extern LexerModule lmPython;
-  extern LexerModule lmRuby;
-  extern LexerModule lmSQL;
-  extern LexerModule lmVB;
-
-  if (  &lmAda
-     && &lmAVE
-     && &lmConf
-     && &lmCPP
-     && &lmNncrontab
-     && &lmEiffel
-     && &lmHTML
-     && &lmLISP
-     && &lmLua
-     && &lmBatch
-     && &lmPascal
-     && &lmPerl
-     && &lmPython
-     && &lmRuby
-     && &lmSQL
-     && &lmVB )
-    {
-      return 1;
-    }
-  else
-    {
-      return 0;
-    }
-}
 
 //----------------------------------------------------------------------
 
@@ -130,6 +83,9 @@ END_EVENT_TABLE()
 IMPLEMENT_CLASS(wxStyledTextCtrl, wxControl)
 IMPLEMENT_DYNAMIC_CLASS(wxStyledTextEvent, wxCommandEvent)
 
+// forces the linking of the lexer modules
+int Scintilla_LinkLexers();
+
 //----------------------------------------------------------------------
 // Constructor and Destructor
 
@@ -143,7 +99,7 @@ wxStyledTextCtrl::wxStyledTextCtrl(wxWindow *parent,
               style | wxVSCROLL | wxHSCROLL | wxWANTS_CHARS | wxCLIP_CHILDREN,
               wxDefaultValidator, name)
 {
-    wxForceScintillaLexers();
+    Scintilla_LinkLexers();
     m_swx = new ScintillaWX(this);
     m_stopWatch.Start();
     m_lastKeyDownConsumed = FALSE;
@@ -558,10 +514,6 @@ void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) {
         evt.SetLength(scn.length);
         break;
 
-    case SCN_POSCHANGED:
-        evt.SetEventType(wxEVT_STC_POSCHANGED);
-        break;
-
     case SCN_PAINTED:
         evt.SetEventType(wxEVT_STC_PAINTED);
         break;