mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-05 11:30:06 +01:00
Turn on isVirtual for HtmlWindow.On* methods
This commit is contained in:
@@ -70,6 +70,9 @@ Changes in this release include the following:
|
||||
* Fix OGL's ShapeCanvas to draw properly when the window is scrolled, and
|
||||
to also adjust the mouse coordinates, etc. (#635)
|
||||
|
||||
* Fixed HtmlWindow's OnFoo virtual methods so calls to them are propagated to
|
||||
the Python class. (#642)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ class MyHtmlWindow(html.HtmlWindow):
|
||||
if isinstance(cell, html.HtmlWordCell):
|
||||
sel = html.HtmlSelection()
|
||||
self.log.WriteText(' %s\n' % cell.ConvertToText(sel))
|
||||
super(MyHtmlWindow, self).OnCellClicked(cell, x, y, evt)
|
||||
return super(MyHtmlWindow, self).OnCellClicked(cell, x, y, evt)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -37,15 +37,22 @@ def run():
|
||||
c = module.find('wxHtmlWindow')
|
||||
assert isinstance(c, etgtools.ClassDef)
|
||||
tools.fixWindowClass(c)
|
||||
c.bases = ['wxScrolledWindow']
|
||||
|
||||
c.find('OnCellClicked').ignore(False)
|
||||
c.find('OnCellMouseHover').ignore(False)
|
||||
c.find('AddFilter.filter').transfer = True
|
||||
|
||||
c.bases = ['wxScrolledWindow', 'wxHtmlWindowInterface']
|
||||
tools.fixHtmlSetFonts(c)
|
||||
|
||||
# Pure virtuals inherited from wxHtmlWindowInterface
|
||||
c.find('AddFilter.filter').transfer = True
|
||||
|
||||
# Turn the virtual flag back on for some methods
|
||||
for name in [ 'OnLinkClicked',
|
||||
'OnOpeningURL',
|
||||
'OnSetTitle',
|
||||
'OnCellMouseHover',
|
||||
'OnCellClicked']:
|
||||
c.find(name).isVirtual = True
|
||||
c.find(name).ignore(False)
|
||||
|
||||
# Declare that the pure virtuals inherited from wxHtmlWindowInterface have
|
||||
# implementations here
|
||||
c.addItem(etgtools.WigCode("""\
|
||||
virtual void SetHTMLWindowTitle(const wxString& title);
|
||||
virtual void OnHTMLLinkClicked(const wxHtmlLinkInfo& link);
|
||||
@@ -62,9 +69,11 @@ def run():
|
||||
virtual wxCursor GetHTMLCursor(wxHtmlWindowInterface::HTMLCursor type) const;
|
||||
"""))
|
||||
|
||||
|
||||
c = module.find('wxHtmlLinkEvent')
|
||||
tools.fixEventClass(c)
|
||||
|
||||
|
||||
c = module.find('wxHtmlCellEvent')
|
||||
tools.fixEventClass(c)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user