mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-07 12:30:07 +01:00
trim trailing space etg directory
This commit is contained in:
40
etg/_xml.py
40
etg/_xml.py
@@ -10,7 +10,7 @@
|
||||
import etgtools
|
||||
import etgtools.tweaker_tools as tools
|
||||
|
||||
PACKAGE = "wx"
|
||||
PACKAGE = "wx"
|
||||
MODULE = "_xml"
|
||||
NAME = "_xml" # Base name of the file to generate to for this script
|
||||
DOCSTRING = """\
|
||||
@@ -21,12 +21,12 @@ provided by Python.
|
||||
"""
|
||||
|
||||
# The classes and/or the basename of the Doxygen XML files to be processed by
|
||||
# this script.
|
||||
# this script.
|
||||
ITEMS = [ 'wxXmlNode',
|
||||
'wxXmlAttribute',
|
||||
'wxXmlDocument',
|
||||
]
|
||||
|
||||
]
|
||||
|
||||
|
||||
# The list of other ETG scripts and back-end generator modules that are
|
||||
# included as part of this module. These should all be items that are put in
|
||||
@@ -43,7 +43,7 @@ OTHERDEPS = [ ]
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
|
||||
def run():
|
||||
# Parse the XML file(s) building a collection of Extractor objects
|
||||
module = etgtools.ModuleDef(PACKAGE, MODULE, NAME, DOCSTRING)
|
||||
@@ -53,7 +53,7 @@ def run():
|
||||
#-----------------------------------------------------------------
|
||||
# Tweak the parsed meta objects in the module object as needed for
|
||||
# customizing the generated code and docstrings.
|
||||
|
||||
|
||||
module.addHeaderCode('#include <wxpy_api.h>')
|
||||
module.addImport('_core')
|
||||
module.addPyCode('import wx', order=10)
|
||||
@@ -61,31 +61,31 @@ def run():
|
||||
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
module.addPyCode("""\
|
||||
XmlProperty = wx.deprecated(XmlAttribute, 'Use XmlProperty instead.')
|
||||
""")
|
||||
|
||||
|
||||
c = module.find('wxXmlNode')
|
||||
assert isinstance(c, etgtools.ClassDef)
|
||||
|
||||
|
||||
c.find('wxXmlNode.parent').transferThis = True
|
||||
|
||||
|
||||
c.find('AddAttribute.attr').transfer = True
|
||||
c.find('AddChild.child').transfer = True
|
||||
c.find('InsertChild.child').transfer = True
|
||||
c.find('InsertChildAfter.child').transfer = True
|
||||
c.find('RemoveChild.child').transferBack = True
|
||||
|
||||
|
||||
# we like the other overload better
|
||||
c.find('GetAttribute').findOverload('value').ignore()
|
||||
|
||||
|
||||
c.find('SetAttributes').ignore()
|
||||
c.find('SetChildren').ignore()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
c = module.find('wxXmlDocument')
|
||||
c.piBases = ['wx.Object']
|
||||
c.find('GetEncoding').ignore()
|
||||
@@ -96,14 +96,14 @@ def run():
|
||||
c.find('DetachRoot').transferBack = True
|
||||
c.find('SetDocumentNode.node').transfer = True
|
||||
c.find('SetRoot.node').transfer = True
|
||||
|
||||
|
||||
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
tools.doCommonTweaks(module)
|
||||
tools.runGenerators(module)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user