X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d56cebe7a497773d8753ea2ab874c4445bac18dc..a81c3c2383f9096ef5e96b708a0f1c1ffe7cc6a8:/wxPython/contrib/xrc/xrc.py?ds=sidebyside diff --git a/wxPython/contrib/xrc/xrc.py b/wxPython/contrib/xrc/xrc.py index ada0084f5b..73e37ee13d 100644 --- a/wxPython/contrib/xrc/xrc.py +++ b/wxPython/contrib/xrc/xrc.py @@ -9,12 +9,16 @@ from windows import * from gdi import * +from fonts import * + from clip_dnd import * from events import * from streams import * +from utils import * + from mdi import * from frames import * @@ -39,14 +43,14 @@ from sizers import * from filesys import * -from utils import * +def XRCID(str_id): + return wxXmlResource_GetXRCID(str_id) -def XMLID(str_id): - return wxXmlResource_GetXMLID(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): @@ -129,11 +133,29 @@ 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 #-------------- VARIABLE WRAPPERS ------------------ -cvar = xrcc.cvar -wxTheXmlResource = wxXmlResourcePtr(xrcc.cvar.wxTheXmlResource) +wxXRC_USE_LOCALE = xrcc.wxXRC_USE_LOCALE +wxXRC_NO_SUBCLASSING = xrcc.wxXRC_NO_SUBCLASSING + + +#-------------- USER INCLUDE ----------------------- + + +# The global was removed in favor of static accessor functions. This is for +# backwards compatibility: +wxTheXmlResource = wxXmlResource_Get()