Merge pull request #1142 from RobinD42/fix-issue1141

Added missing HtmlWindow.ScrollToAnchor method
This commit is contained in:
Robin Dunn
2019-01-15 15:56:23 -08:00
committed by GitHub
3 changed files with 25 additions and 0 deletions

View File

@@ -19,6 +19,8 @@ Pip: ``pip install wxPython==4.0.5``
Changes in this release include the following:
* Added missing HtmlWindow.ScrollToAnchor method, and also a couple methods
in HtmlCell too. (#1141)

View File

@@ -9,6 +9,7 @@
import etgtools
import etgtools.tweaker_tools as tools
from etgtools import MethodDef, ParamDef
PACKAGE = "wx"
MODULE = "_html"
@@ -63,6 +64,19 @@ def run():
m.find('param').type = 'const char*'
m.cppSignature = 'const wxHtmlCell* (int condition, const void* param)'
m = MethodDef(name='GetAbsPos', type='wxPoint', isConst=True,
items=[ParamDef(type='wxHtmlCell*', name='rootCell', default='NULL')],
doc="""\
Returns absolute position of the cell on HTML canvas.\n
If rootCell is provided, then it's considered to be the root of the
hierarchy and the returned value is relative to it.
""")
c.addItem(m)
m = MethodDef(name='GetRootCell', type='wxHtmlCell*', isConst=True,
doc="Returns the root cell of the hierarchy.")
c.addItem(m)
c = module.find('wxHtmlContainerCell')
c.find('InsertCell.cell').transfer = True

View File

@@ -9,6 +9,7 @@
import etgtools
import etgtools.tweaker_tools as tools
from etgtools import MethodDef, ParamDef
PACKAGE = "wx"
MODULE = "_html"
@@ -75,6 +76,14 @@ def run():
virtual wxCursor GetHTMLCursor(wxHtmlWindowInterface::HTMLCursor type) const;
"""))
m = MethodDef(name='ScrollToAnchor', type='bool', protection='protected',
items=[ParamDef(type='const wxString&', name='anchor')],
doc="""\
Scrolls to anchor of this name.
Returns True is anchor exists, False otherwise.
""")
c.addItem(m)
c = module.find('wxHtmlLinkEvent')
tools.fixEventClass(c)