]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/contrib/xrc/xrc.i
Moved tools to be a Python package in wxPython.tools, added scripts to
[wxWidgets.git] / wxPython / contrib / xrc / xrc.i
index 9334bad198ac04f8376eceebbe5c726b94c43fa2..2f481c01d12f776ed60e4ca5cf0bc138590260ba 100644 (file)
@@ -14,7 +14,7 @@
 
 
 %{
-#include "export.h"
+#include "wxPython.h"
 #include "wx/xrc/xmlres.h"
 %}
 
@@ -89,6 +89,8 @@ public:
 
     // Loads menubar from resource. Returns NULL on failure.
     wxMenuBar *LoadMenuBar(const wxString& name);
+    %name(LoadMenuBarOnFrame) wxMenuBar *LoadMenuBar(wxWindow *parent, const wxString& name);
+
 
     // Loads toolbar
     wxToolBar *LoadToolBar(wxWindow *parent, const wxString& name);
@@ -122,7 +124,7 @@ public:
     // Returns numeric ID that is equivalent to string id used in XML
     // resource. To be used in event tables
     // Macro XMLID is provided for convenience
-    static int GetXMLID(const char *str_id);
+    static int GetXRCID(const wxString& str_id);
 
     // Returns version info (a.b.c.d = d+ 256*c + 256^2*b + 256^3*a)
     long GetVersion() const;
@@ -142,12 +144,14 @@ public:
 //----------------------------------------------------------------------
 
 %pragma(python) code = "
-def XMLID(str_id):
-    return wxXmlResource_GetXMLID(str_id)
+def XRCID(str_id):
+    return wxXmlResource_GetXRCID(str_id)
 
-def XMLCTRL(window, str_id, *args):
-    return window.FindWindowById(XMLID(str_id))
+def XRCCTRL(window, str_id, *ignoreargs):
+    return window.FindWindowById(XRCID(str_id))
 
+XMLID = XRCID
+XMLCTRL = XRCCTRL
 "
 
 //----------------------------------------------------------------------
@@ -161,7 +165,6 @@ def XMLCTRL(window, str_id, *args):
     wxClassInfo::CleanUpClasses();
     wxClassInfo::InitializeClasses();
 
-    wxXmlInitXmlModule();
     wxXmlInitResourceModule();
     wxXmlResource::Get()->InitAllHandlers();