mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-07 04:20:07 +01:00
Construct and ClassDef for wxXmlSubclassFactory instead of just inserting the text for the declaration.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73783 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
28
etg/_xrc.py
28
etg/_xrc.py
@@ -9,7 +9,8 @@
|
||||
|
||||
import etgtools
|
||||
import etgtools.tweaker_tools as tools
|
||||
from etgtools import PyFunctionDef, PyCodeDef, PyPropertyDef
|
||||
from etgtools import PyFunctionDef, PyCodeDef, PyPropertyDef,\
|
||||
ClassDef, MethodDef, ParamDef
|
||||
|
||||
PACKAGE = "wx"
|
||||
MODULE = "_xrc"
|
||||
@@ -151,19 +152,22 @@ def run():
|
||||
module.addPyFunction('XRCCTRL', '(window, str_id, *ignoreargs)',
|
||||
doc='Returns the child window associated with the string ID in an XML resource.',
|
||||
body='return window.FindWindowById(XRCID(str_id))')
|
||||
|
||||
|
||||
|
||||
module.addItem(etgtools.WigCode("""\
|
||||
class wxXmlSubclassFactory
|
||||
{
|
||||
public:
|
||||
wxXmlSubclassFactory();
|
||||
virtual ~wxXmlSubclassFactory();
|
||||
virtual wxObject *Create(const wxString& className) = 0;
|
||||
};"""))
|
||||
|
||||
|
||||
|
||||
cls = ClassDef(name='wxXmlSubclassFactory',
|
||||
briefDoc="",
|
||||
items=[
|
||||
MethodDef(name='wxXmlSubclassFactory', isCtor=True),
|
||||
MethodDef(name='~wxXmlSubclassFactory', isDtor=True),
|
||||
MethodDef(name='Create', type='wxObject*',
|
||||
isVirtual=True, isPureVirtual=True,
|
||||
items=[ParamDef(type='const wxString&', name='className')])
|
||||
])
|
||||
module.addItem(cls)
|
||||
|
||||
|
||||
|
||||
module.addPyCode("""\
|
||||
# Create a factory for handling the subclass property of XRC's
|
||||
# object tag. This factory will search for the specified
|
||||
|
||||
Reference in New Issue
Block a user