mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-05 03:20:08 +01:00
Add richtexthtml and richtextxml
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@74139 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -27,6 +27,8 @@ ITEMS = [ ]
|
|||||||
INCLUDES = [
|
INCLUDES = [
|
||||||
'richtextbuffer',
|
'richtextbuffer',
|
||||||
'richtextctrl',
|
'richtextctrl',
|
||||||
|
'richtexthtml',
|
||||||
|
'richtextxml',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ def run():
|
|||||||
module.addItem(
|
module.addItem(
|
||||||
tools.wxListWrapperTemplate('wxRichTextLineList', 'wxRichTextLine', module))
|
tools.wxListWrapperTemplate('wxRichTextLineList', 'wxRichTextLine', module))
|
||||||
|
|
||||||
# Can this even work?
|
# Can this even work? Apparently it does.
|
||||||
module.addItem(
|
module.addItem(
|
||||||
tools.wxArrayPtrWrapperTemplate('wxRichTextObjectPtrArray', 'wxRichTextObject', module))
|
tools.wxArrayPtrWrapperTemplate('wxRichTextObjectPtrArray', 'wxRichTextObject', module))
|
||||||
module.addItem(
|
module.addItem(
|
||||||
@@ -102,7 +102,6 @@ def run():
|
|||||||
// forward declarations
|
// forward declarations
|
||||||
class wxRichTextStyleDefinition;
|
class wxRichTextStyleDefinition;
|
||||||
class wxRichTextListStyleDefinition;
|
class wxRichTextListStyleDefinition;
|
||||||
class wxRichTextXMLHandler;
|
|
||||||
class wxRichTextStyleSheet;
|
class wxRichTextStyleSheet;
|
||||||
class wxRichTextFloatCollector;
|
class wxRichTextFloatCollector;
|
||||||
"""))
|
"""))
|
||||||
|
|||||||
47
etg/richtexthtml.py
Normal file
47
etg/richtexthtml.py
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Name: etg/richtexthtml.py
|
||||||
|
# Author: Robin Dunn
|
||||||
|
#
|
||||||
|
# Created: 13-May-2013
|
||||||
|
# Copyright: (c) 2013 by Total Control Software
|
||||||
|
# License: wxWindows License
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
import etgtools
|
||||||
|
import etgtools.tweaker_tools as tools
|
||||||
|
|
||||||
|
PACKAGE = "wx"
|
||||||
|
MODULE = "_richtext"
|
||||||
|
NAME = "richtexthtml" # 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 = [ "wxRichTextHTMLHandler",
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
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('wxRichTextHTMLHandler')
|
||||||
|
#assert isinstance(c, etgtools.ClassDef)
|
||||||
|
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------
|
||||||
|
tools.doCommonTweaks(module)
|
||||||
|
tools.runGenerators(module)
|
||||||
|
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
if __name__ == '__main__':
|
||||||
|
run()
|
||||||
|
|
||||||
47
etg/richtextxml.py
Normal file
47
etg/richtextxml.py
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Name: etg/richtextxml.py
|
||||||
|
# Author: Robin Dunn
|
||||||
|
#
|
||||||
|
# Created: 13-May-2013
|
||||||
|
# Copyright: (c) 2013 by Total Control Software
|
||||||
|
# License: wxWindows License
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
import etgtools
|
||||||
|
import etgtools.tweaker_tools as tools
|
||||||
|
|
||||||
|
PACKAGE = "wx"
|
||||||
|
MODULE = "_richtext"
|
||||||
|
NAME = "richtextxml" # 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 = [ "wxRichTextXMLHandler",
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
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('wxRichTextXMLHandler')
|
||||||
|
#assert isinstance(c, etgtools.ClassDef)
|
||||||
|
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------
|
||||||
|
tools.doCommonTweaks(module)
|
||||||
|
tools.runGenerators(module)
|
||||||
|
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
if __name__ == '__main__':
|
||||||
|
run()
|
||||||
|
|
||||||
16
unittests/test_richtexthtml.py
Normal file
16
unittests/test_richtexthtml.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
import imp_unittest, unittest
|
||||||
|
import wtc
|
||||||
|
import wx
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
class richtexthtml_Tests(wtc.WidgetTestCase):
|
||||||
|
|
||||||
|
# TODO: Remove this test and add real ones.
|
||||||
|
def test_richtexthtml1(self):
|
||||||
|
self.fail("Unit tests for richtexthtml not implemented yet.")
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
unittest.main()
|
||||||
16
unittests/test_richtextxml.py
Normal file
16
unittests/test_richtextxml.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
import imp_unittest, unittest
|
||||||
|
import wtc
|
||||||
|
import wx
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
class richtextxml_Tests(wtc.WidgetTestCase):
|
||||||
|
|
||||||
|
# TODO: Remove this test and add real ones.
|
||||||
|
def test_richtextxml1(self):
|
||||||
|
self.fail("Unit tests for richtextxml not implemented yet.")
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
unittest.main()
|
||||||
Reference in New Issue
Block a user