X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b5a5d6473c0f5339854a4105a57c6a733632f073..5a07e9748288d199216af61dcac67d45011e36fe:/wxPython/contrib/xrc/xrc.py diff --git a/wxPython/contrib/xrc/xrc.py b/wxPython/contrib/xrc/xrc.py index 7338628c21..45f3673db6 100644 --- a/wxPython/contrib/xrc/xrc.py +++ b/wxPython/contrib/xrc/xrc.py @@ -9,6 +9,8 @@ from windows import * from gdi import * +from fonts import * + from clip_dnd import * from events import * @@ -41,12 +43,14 @@ from sizers import * from filesys import * -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 class wxXmlResourcePtr(wxObjectPtr): def __init__(self,this): @@ -73,6 +77,9 @@ class wxXmlResourcePtr(wxObjectPtr): def LoadMenuBar(self, *_args, **_kwargs): val = apply(xrcc.wxXmlResource_LoadMenuBar,(self,) + _args, _kwargs) return val + def LoadMenuBarOnFrame(self, *_args, **_kwargs): + val = apply(xrcc.wxXmlResource_LoadMenuBarOnFrame,(self,) + _args, _kwargs) + return val def LoadToolBar(self, *_args, **_kwargs): val = apply(xrcc.wxXmlResource_LoadToolBar,(self,) + _args, _kwargs) return val @@ -129,7 +136,17 @@ def wxXmlResource(*_args,**_kwargs): #-------------- FUNCTION WRAPPERS ------------------ -wxXmlResource_GetXMLID = xrcc.wxXmlResource_GetXMLID +wxXmlResource_GetXRCID = xrcc.wxXmlResource_GetXRCID + +def wxXmlResource_Get(*_args, **_kwargs): + val = apply(xrcc.wxXmlResource_Get,_args,_kwargs) + if val: val = wxXmlResourcePtr(val) + return val + +def wxXmlResource_Set(*_args, **_kwargs): + val = apply(xrcc.wxXmlResource_Set,_args,_kwargs) + if val: val = wxXmlResourcePtr(val) + return val @@ -137,5 +154,11 @@ wxXmlResource_GetXMLID = xrcc.wxXmlResource_GetXMLID wxXRC_USE_LOCALE = xrcc.wxXRC_USE_LOCALE wxXRC_NO_SUBCLASSING = xrcc.wxXRC_NO_SUBCLASSING -cvar = xrcc.cvar -wxTheXmlResource = wxXmlResourcePtr(xrcc.cvar.wxTheXmlResource) + + +#-------------- USER INCLUDE ----------------------- + + +# The global was removed in favor of static accessor functions. This is for +# backwards compatibility: +wxTheXmlResource = wxXmlResource_Get()