mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-05 03:20:08 +01:00
Phoenix: few additional fixes to some of the samples, plus better formatting for the remaining troublesome docs classes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73114 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -102,14 +102,46 @@ NO_MODULE = {
|
||||
|
||||
# -- wxDataView -- #
|
||||
# Widgets
|
||||
'DataViewItemObjectMapper': 'dataview.',
|
||||
'PyDataViewModel' : 'dataview.',
|
||||
|
||||
# Enums/constants
|
||||
'DataViewCellMode' : 'dataview.',
|
||||
'DataViewCellRenderState' : 'dataview.',
|
||||
'DataViewColumnFlags' : 'dataview.',
|
||||
'DataViewItemObjectMapper': 'dataview.',
|
||||
'PyDataViewModel' : 'dataview.',
|
||||
|
||||
# -- wxHTML -- #
|
||||
# Widgets
|
||||
|
||||
# Enums/constants
|
||||
'HTMLCursor' : 'html.',
|
||||
'HtmlOpeningStatus' : 'html.',
|
||||
'HtmlScriptMode' : 'html.',
|
||||
'HtmlSelectionState' : 'html.',
|
||||
'HtmlURLType' : 'html.',
|
||||
|
||||
# -- wxHTML2 -- #
|
||||
# Widgets
|
||||
|
||||
# Enums/constants
|
||||
'WebViewBackend' : 'html2.',
|
||||
'WebViewNavigationError' : 'html2.',
|
||||
'WebViewReloadFlags' : 'html2.',
|
||||
'WebViewZoom' : 'html2.',
|
||||
'WebViewZoomType' : 'html2.',
|
||||
|
||||
# -- wxXML -- #
|
||||
# Widgets
|
||||
|
||||
# Enums/constants
|
||||
'XmlDocumentLoadFlag' : 'xml.',
|
||||
'XmlNodeType' : 'xml.',
|
||||
|
||||
# -- wxXRC -- #
|
||||
# Widgets
|
||||
|
||||
# Enums/constants
|
||||
'XmlResourceFlags' : 'xrc.',
|
||||
}
|
||||
|
||||
# Other C++ specific things to strip away
|
||||
|
||||
@@ -169,11 +169,14 @@ def BuildEnumsAndMethods(sphinxDir):
|
||||
text = text.replace('EmptyString', "''")
|
||||
|
||||
# Replace ArrayXXX stuff...
|
||||
|
||||
for cpp in ['ArrayString()', 'ArrayInt()', 'ArrayDouble()', 'ArrayString']:
|
||||
text = text.replace(cpp, '[]')
|
||||
|
||||
# Remove lines with "Event macros" in them...
|
||||
text = text.replace('Event macros:', '')
|
||||
|
||||
text = TooltipsOnInheritance(text, class_summary)
|
||||
text = AddSpacesToLinks(text)
|
||||
|
||||
if text != orig_text:
|
||||
fid = textfile_open(input, 'wt')
|
||||
@@ -336,6 +339,17 @@ def RemoveUnreferenced(input, class_summary, enum_base, unreferenced_classes, te
|
||||
|
||||
# ----------------------------------------------------------------------- #
|
||||
|
||||
def AddSpacesToLinks(text):
|
||||
|
||||
regex = re.findall('\w:ref:`(.*?)`', text)
|
||||
|
||||
for reg in regex:
|
||||
text = text.replace(':ref:`%s`'%reg, ' :ref:`%s`'%reg)
|
||||
|
||||
return text
|
||||
|
||||
# ----------------------------------------------------------------------- #
|
||||
|
||||
def ReformatFunctions(file):
|
||||
|
||||
text_file = os.path.splitext(file)[0] + '.txt'
|
||||
|
||||
@@ -288,8 +288,13 @@ def PythonizeType(ptype):
|
||||
if 'Image.' in ptype:
|
||||
ptype = ptype.split('.')[-1]
|
||||
|
||||
if 'FileName' in ptype:
|
||||
ptype = 'string'
|
||||
|
||||
if ptype.endswith('&'):
|
||||
ptype = ':class:`%s`'%ptype[0:-1]
|
||||
ptype = ptype[0:-1]
|
||||
if ' ' not in ptype:
|
||||
ptype = ':class:`%s`'%ptype
|
||||
|
||||
return ptype
|
||||
|
||||
|
||||
Reference in New Issue
Block a user