trim trailing space etg directory

This commit is contained in:
Metallicow
2016-11-10 12:08:36 -06:00
parent b4e9d89f1a
commit ebc8d0d971
248 changed files with 4074 additions and 4075 deletions

View File

@@ -10,26 +10,26 @@
import etgtools
import etgtools.tweaker_tools as tools
PACKAGE = "wx"
PACKAGE = "wx"
MODULE = "_core"
NAME = "icon" # Base name of the file to generate to for this script
DOCSTRING = ""
# The classes and/or the basename of the Doxygen XML files to be processed by
# this script.
ITEMS = [ "wxIcon", ]
# this script.
ITEMS = [ "wxIcon", ]
#---------------------------------------------------------------------------
def run():
# Parse the XML file(s) building a collection of Extractor objects
module = etgtools.ModuleDef(PACKAGE, MODULE, NAME, DOCSTRING)
etgtools.parseDoxyXML(module, ITEMS)
#-----------------------------------------------------------------
# Tweak the parsed meta objects in the module object as needed for
# customizing the generated code and docstrings.
c = module.find('wxIcon')
assert isinstance(c, etgtools.ClassDef)
tools.removeVirtuals(c)
@@ -37,7 +37,7 @@ def run():
c.find('wxIcon').findOverload('*bits').ignore()
c.find('wxIcon').findOverload('bits[]').ignore()
c.find('wxIcon.type').default = 'wxBITMAP_TYPE_ANY'
c.find('wxIcon.type').default = 'wxBITMAP_TYPE_ANY'
c.find('LoadFile.type').default = 'wxBITMAP_TYPE_ANY'
c.find('ConvertToDisabled').ignore()
@@ -49,10 +49,10 @@ def run():
icon->CopyFromBitmap(*bmp);
return icon;
""")
c.addCppMethod('int', '__nonzero__', '()', """\
return self->IsOk();""")
c.addCppMethod('long', 'GetHandle', '()', """\
#ifdef __WXMSW__
return (long)self->GetHandle();
@@ -66,7 +66,7 @@ def run():
self->SetHandle((WXHANDLE)handle);
#endif
""")
c.find('CreateFromHICON').ignore()
c.addCppMethod('bool', 'CreateFromHICON', '(long hicon)',
doc='MSW-only method to create a wx.Icon from a native icon handle.',
@@ -77,18 +77,18 @@ def run():
return false;
#endif
""")
# For compatibility:
module.addPyFunction('EmptyIcon', '()',
deprecated="Use :class:`Icon` instead",
doc='A compatibility wrapper for the :class:`Icon` constructor',
body='return Icon()')
#-----------------------------------------------------------------
tools.doCommonTweaks(module)
tools.runGenerators(module)
#---------------------------------------------------------------------------
if __name__ == '__main__':