]> git.saurik.com Git - wxWidgets.git/commitdiff
Add wxRichTextModuleInit
authorRobin Dunn <robin@alldunn.com>
Mon, 16 Oct 2006 18:12:17 +0000 (18:12 +0000)
committerRobin Dunn <robin@alldunn.com>
Mon, 16 Oct 2006 18:12:17 +0000 (18:12 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42050 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/richtext/richtextbuffer.h
src/richtext/richtextbuffer.cpp

index 557e5b46ca14d45f9c18f273b8e7979e12203a89..ed0da6c2c15c7982b51819a293c3da30ee0ec0f7 100644 (file)
@@ -2015,6 +2015,9 @@ void wxSetFontPreservingStyles(wxTextAttr& attr, const wxFont& font);
 /// Convert a decimal to Roman numerals
 wxString wxRichTextDecimalToRoman(long n);
 
+
+WXDLLIMPEXP_RICHTEXT void wxRichTextModuleInit();
+
 #endif
     // wxUSE_RICHTEXT
 
index 0921ba0ff1a6007f22d410a54d970ba7ff925123..263152bc9be8289f90ef220e1271755e77a0c326 100644 (file)
@@ -4934,6 +4934,17 @@ public:
 IMPLEMENT_DYNAMIC_CLASS(wxRichTextModule, wxModule)
 
 
+// If the richtext lib is dynamically loaded after the app has already started
+// (such as from wxPython) then the built-in module system will not init this
+// module.  Provide this function to do it manually.
+void wxRichTextModuleInit()
+{
+    wxModule* module = new wxRichTextModule;
+    module->Init();
+    wxModule::RegisterModule(module);
+}
+
+
 /*!
  * Commands for undo/redo
  *