| 1 |
#!/usr/bin/env python |
#!/usr/bin/env python |
| 2 |
|
|
|
# generated by wxGlade 0.3.3 on Wed Aug 25 15:12:49 2004 |
|
|
# code ripped from Pears: http://project5.freezope.org/pears/ |
|
|
|
|
| 3 |
# $Id$ |
# $Id$ |
| 4 |
# $Log$ |
# $Log$ |
| 5 |
|
# Revision 1.2 2004/08/26 15:05:28 joko |
| 6 |
|
# propagate arguments transparently to superclass-constructor |
| 7 |
|
# |
| 8 |
# Revision 1.1 2004/08/25 22:45:51 joko |
# Revision 1.1 2004/08/25 22:45:51 joko |
| 9 |
# initial commit |
# initial commit |
| 10 |
# |
# |
| 11 |
|
|
|
#import wx |
|
| 12 |
from wxPython.wx import * |
from wxPython.wx import * |
| 13 |
from wxPython.html import * |
from wxPython.html import * |
| 14 |
|
|
| 15 |
class FraggleHtmlWindow(wxHtmlWindow): |
class FraggleHtmlWindow(wxHtmlWindow): |
| 16 |
"""Adds OnLinkClicked""" |
"""Adds OnLinkClicked""" |
| 17 |
def __init__(self, parent, id): |
# learned from wxGlade: |
| 18 |
wxHtmlWindow.__init__(self, parent, id, style=wxNO_FULL_REPAINT_ON_RESIZE) |
# propagate arguments transparently to superclass-constructor |
| 19 |
self.urlOpener=None # must be assigned from pearsapp! |
def __init__(self, *args, **kwds): |
| 20 |
|
wxHtmlWindow.__init__(self, *args, **kwds) |
| 21 |
|
self.urlOpener = None # must be assigned from main application! |
| 22 |
def OnLinkClicked(self, linkinfo): |
def OnLinkClicked(self, linkinfo): |
| 23 |
self.urlOpener.open(linkinfo.GetHref()) |
self.urlOpener.open(linkinfo.GetHref()) |
|
|
|