mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-05 03:20:08 +01:00
Add some of the HelpController classes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71129 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
11
TODO.txt
11
TODO.txt
@@ -103,12 +103,6 @@ WAF Build
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Deprecated C++ items
|
|
||||||
---------------------
|
|
||||||
* Does Doxygen have a standard way to mark items as deprecated
|
|
||||||
that will also be tagged as such in the XML?
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
other dev stuff
|
other dev stuff
|
||||||
---------------
|
---------------
|
||||||
@@ -176,6 +170,11 @@ other dev stuff
|
|||||||
|
|
||||||
* Check wxDialog::CreateTextSizer, is it wrapped?
|
* Check wxDialog::CreateTextSizer, is it wrapped?
|
||||||
|
|
||||||
|
* Add wxCHMHelpController (MSW-only)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Python 3.x
|
Python 3.x
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ ITEMS = [ ]
|
|||||||
# the wxWidgets "adv" library in a multi-lib build.
|
# the wxWidgets "adv" library in a multi-lib build.
|
||||||
INCLUDES = [
|
INCLUDES = [
|
||||||
'aboutdlg',
|
'aboutdlg',
|
||||||
|
'helpext',
|
||||||
|
|
||||||
# TODOs -
|
# TODOs -
|
||||||
# These modules are also in the C++ adv lib and so should included be here:
|
# These modules are also in the C++ adv lib and so should included be here:
|
||||||
|
|||||||
@@ -175,6 +175,7 @@ INCLUDES = [ # core
|
|||||||
'process',
|
'process',
|
||||||
'uiaction',
|
'uiaction',
|
||||||
'snglinst',
|
'snglinst',
|
||||||
|
'help',
|
||||||
'cshelp',
|
'cshelp',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -71,7 +71,6 @@ def run():
|
|||||||
class wxCaret;
|
class wxCaret;
|
||||||
class wxImageHandler;
|
class wxImageHandler;
|
||||||
class wxExecuteEnv;
|
class wxExecuteEnv;
|
||||||
class wxHelpControllerBase;
|
|
||||||
"""))
|
"""))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
63
etg/help.py
Normal file
63
etg/help.py
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Name: etg/help.py
|
||||||
|
# Author: Robin Dunn
|
||||||
|
#
|
||||||
|
# Created: 06-Apr-2012
|
||||||
|
# Copyright: (c) 2012 by Total Control Software
|
||||||
|
# License: wxWindows License
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
import etgtools
|
||||||
|
import etgtools.tweaker_tools as tools
|
||||||
|
|
||||||
|
PACKAGE = "wx"
|
||||||
|
MODULE = "_core"
|
||||||
|
NAME = "help" # 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 = [ "wxHelpControllerBase",
|
||||||
|
"wxHelpController",
|
||||||
|
]
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
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('wxHelpControllerBase')
|
||||||
|
assert isinstance(c, etgtools.ClassDef)
|
||||||
|
c.abstract = True
|
||||||
|
|
||||||
|
c = module.find('wxHelpController')
|
||||||
|
c.addPrivateCopyCtor()
|
||||||
|
|
||||||
|
# Add pure virtuals with implemenations here
|
||||||
|
c.addItem(etgtools.WigCode("""\
|
||||||
|
virtual bool DisplayBlock(long blockNo);
|
||||||
|
virtual bool DisplayContents();
|
||||||
|
virtual bool DisplaySection(int sectionNo);
|
||||||
|
virtual bool KeywordSearch(const wxString& keyWord,
|
||||||
|
wxHelpSearchMode mode = wxHELP_SEARCH_ALL);
|
||||||
|
virtual bool LoadFile(const wxString& file = wxEmptyString);
|
||||||
|
virtual bool Quit();
|
||||||
|
"""))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------
|
||||||
|
tools.doCommonTweaks(module)
|
||||||
|
tools.runGenerators(module)
|
||||||
|
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
if __name__ == '__main__':
|
||||||
|
run()
|
||||||
|
|
||||||
47
etg/helpext.py
Normal file
47
etg/helpext.py
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Name: etg/helpext.py
|
||||||
|
# Author: Robin Dunn
|
||||||
|
#
|
||||||
|
# Created: 06-Apr-2012
|
||||||
|
# Copyright: (c) 2012 by Total Control Software
|
||||||
|
# License: wxWindows License
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
import etgtools
|
||||||
|
import etgtools.tweaker_tools as tools
|
||||||
|
|
||||||
|
PACKAGE = "wx"
|
||||||
|
MODULE = "_adv"
|
||||||
|
NAME = "helpext" # 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 = [ "wxExtHelpController",
|
||||||
|
]
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
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('wxExtHelpController')
|
||||||
|
assert isinstance(c, etgtools.ClassDef)
|
||||||
|
c.addPrivateCopyCtor()
|
||||||
|
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------
|
||||||
|
tools.doCommonTweaks(module)
|
||||||
|
tools.runGenerators(module)
|
||||||
|
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
if __name__ == '__main__':
|
||||||
|
run()
|
||||||
|
|
||||||
16
unittests/test_help.py
Normal file
16
unittests/test_help.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
import imp_unittest, unittest
|
||||||
|
import wtc
|
||||||
|
import wx
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
class help_Tests(wtc.WidgetTestCase):
|
||||||
|
|
||||||
|
def test_help1(self):
|
||||||
|
hc = wx.HelpController()
|
||||||
|
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
unittest.main()
|
||||||
16
unittests/test_helpext.py
Normal file
16
unittests/test_helpext.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
import imp_unittest, unittest
|
||||||
|
import wtc
|
||||||
|
import wx
|
||||||
|
import wx.adv
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
class helpext_Tests(wtc.WidgetTestCase):
|
||||||
|
|
||||||
|
def test_helpext1(self):
|
||||||
|
hc = wx.adv.ExtHelpController()
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
unittest.main()
|
||||||
Reference in New Issue
Block a user