Add HtmlHelp classes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@72853 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2012-11-01 22:51:02 +00:00
parent 555fcb7f22
commit d3bc68a180
11 changed files with 336 additions and 0 deletions

View File

@@ -32,6 +32,12 @@ INCLUDES = [
'htmlwin', 'htmlwin',
'htmlprint', 'htmlprint',
#'htmlwinpars', #'htmlwinpars',
'helpctrl',
'helpdata',
'helpdlg',
'helpfrm',
'helpwnd',
] ]

48
etg/helpctrl.py Normal file
View File

@@ -0,0 +1,48 @@
#---------------------------------------------------------------------------
# Name: etg/helpctrl.py
# Author: Robin Dunn
#
# Created: 30-Oct-2012
# Copyright: (c) 2012 by Total Control Software
# License: wxWindows License
#---------------------------------------------------------------------------
import etgtools
import etgtools.tweaker_tools as tools
PACKAGE = "wx"
MODULE = "_html"
NAME = "helpctrl" # 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 = [ "wxHtmlHelpController",
"wxHtmlModalHelp",
]
#---------------------------------------------------------------------------
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('wxHtmlHelpController')
assert isinstance(c, etgtools.ClassDef)
c.addPrivateCopyCtor()
#-----------------------------------------------------------------
tools.doCommonTweaks(module)
tools.runGenerators(module)
#---------------------------------------------------------------------------
if __name__ == '__main__':
run()

58
etg/helpdata.py Normal file
View File

@@ -0,0 +1,58 @@
#---------------------------------------------------------------------------
# Name: etg/helpdata.py
# Author: Robin Dunn
#
# Created: 30-Oct-2012
# Copyright: (c) 2012 by Total Control Software
# License: wxWindows License
#---------------------------------------------------------------------------
import etgtools
import etgtools.tweaker_tools as tools
PACKAGE = "wx"
MODULE = "_html"
NAME = "helpdata" # 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 = [ "wxHtmlBookRecord",
"wxHtmlHelpDataItem",
"wxHtmlHelpData",
]
#---------------------------------------------------------------------------
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.
module.addItem(
tools.wxArrayWrapperTemplate('wxHtmlBookRecArray', 'wxHtmlBookRecord', module))
module.addItem(
tools.wxArrayWrapperTemplate('wxHtmlHelpDataItems', 'wxHtmlHelpDataItem', module))
c = module.find('wxHtmlHelpData')
assert isinstance(c, etgtools.ClassDef)
c.addPrivateCopyCtor()
#-----------------------------------------------------------------
tools.doCommonTweaks(module)
tools.runGenerators(module)
#---------------------------------------------------------------------------
if __name__ == '__main__':
run()

47
etg/helpdlg.py Normal file
View File

@@ -0,0 +1,47 @@
#---------------------------------------------------------------------------
# Name: etg/helpdlg.py
# Author: Robin Dunn
#
# Created: 30-Oct-2012
# Copyright: (c) 2012 by Total Control Software
# License: wxWindows License
#---------------------------------------------------------------------------
import etgtools
import etgtools.tweaker_tools as tools
PACKAGE = "wx"
MODULE = "_html"
NAME = "helpdlg" # 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 = [ "wxHtmlHelpDialog",
]
#---------------------------------------------------------------------------
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('wxHtmlHelpDialog')
assert isinstance(c, etgtools.ClassDef)
tools.fixTopLevelWindowClass(c)
#-----------------------------------------------------------------
tools.doCommonTweaks(module)
tools.runGenerators(module)
#---------------------------------------------------------------------------
if __name__ == '__main__':
run()

49
etg/helpfrm.py Normal file
View File

@@ -0,0 +1,49 @@
#---------------------------------------------------------------------------
# Name: etg/helpfrm.py
# Author: Robin Dunn
#
# Created: 30-Oct-2012
# Copyright: (c) 2012 by Total Control Software
# License: wxWindows License
#---------------------------------------------------------------------------
import etgtools
import etgtools.tweaker_tools as tools
PACKAGE = "wx"
MODULE = "_html"
NAME = "helpfrm" # 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 = [ "wxHtmlHelpFrame",
]
#---------------------------------------------------------------------------
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('wxHtmlHelpFrame')
assert isinstance(c, etgtools.ClassDef)
tools.fixTopLevelWindowClass(c)
#-----------------------------------------------------------------
tools.doCommonTweaks(module)
tools.runGenerators(module)
#---------------------------------------------------------------------------
if __name__ == '__main__':
run()

48
etg/helpwnd.py Normal file
View File

@@ -0,0 +1,48 @@
#---------------------------------------------------------------------------
# Name: etg/helpwnd.py
# Author: Robin Dunn
#
# Created: 30-Oct-2012
# Copyright: (c) 2012 by Total Control Software
# License: wxWindows License
#---------------------------------------------------------------------------
import etgtools
import etgtools.tweaker_tools as tools
PACKAGE = "wx"
MODULE = "_html"
NAME = "helpwnd" # 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 = [ "wxHtmlHelpWindow",
]
#---------------------------------------------------------------------------
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('wxHtmlHelpWindow')
assert isinstance(c, etgtools.ClassDef)
tools.fixWindowClass(c)
#-----------------------------------------------------------------
tools.doCommonTweaks(module)
tools.runGenerators(module)
#---------------------------------------------------------------------------
if __name__ == '__main__':
run()

View File

@@ -0,0 +1,16 @@
import imp_unittest, unittest
import wtc
import wx
#---------------------------------------------------------------------------
class helpctrl_Tests(wtc.WidgetTestCase):
# TODO: Remove this test and add real ones.
def test_helpctrl1(self):
self.fail("Unit tests for helpctrl not implemented yet.")
#---------------------------------------------------------------------------
if __name__ == '__main__':
unittest.main()

View File

@@ -0,0 +1,16 @@
import imp_unittest, unittest
import wtc
import wx
#---------------------------------------------------------------------------
class helpdata_Tests(wtc.WidgetTestCase):
# TODO: Remove this test and add real ones.
def test_helpdata1(self):
self.fail("Unit tests for helpdata not implemented yet.")
#---------------------------------------------------------------------------
if __name__ == '__main__':
unittest.main()

16
unittests/test_helpdlg.py Normal file
View File

@@ -0,0 +1,16 @@
import imp_unittest, unittest
import wtc
import wx
#---------------------------------------------------------------------------
class helpdlg_Tests(wtc.WidgetTestCase):
# TODO: Remove this test and add real ones.
def test_helpdlg1(self):
self.fail("Unit tests for helpdlg not implemented yet.")
#---------------------------------------------------------------------------
if __name__ == '__main__':
unittest.main()

16
unittests/test_helpfrm.py Normal file
View File

@@ -0,0 +1,16 @@
import imp_unittest, unittest
import wtc
import wx
#---------------------------------------------------------------------------
class helpfrm_Tests(wtc.WidgetTestCase):
# TODO: Remove this test and add real ones.
def test_helpfrm1(self):
self.fail("Unit tests for helpfrm not implemented yet.")
#---------------------------------------------------------------------------
if __name__ == '__main__':
unittest.main()

16
unittests/test_helpwnd.py Normal file
View File

@@ -0,0 +1,16 @@
import imp_unittest, unittest
import wtc
import wx
#---------------------------------------------------------------------------
class helpwnd_Tests(wtc.WidgetTestCase):
# TODO: Remove this test and add real ones.
def test_helpwnd1(self):
self.fail("Unit tests for helpwnd not implemented yet.")
#---------------------------------------------------------------------------
if __name__ == '__main__':
unittest.main()