X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4b123bb9ccbacf21c742173e95f418cca9a5516c..f6bcfd974ef26faf6f91a62cac09827e09463fd1:/utils/wxPython/modules/html/htmlhelper.py?ds=inline diff --git a/utils/wxPython/modules/html/htmlhelper.py b/utils/wxPython/modules/html/htmlhelper.py deleted file mode 100644 index d8fe3c3ef5..0000000000 --- a/utils/wxPython/modules/html/htmlhelper.py +++ /dev/null @@ -1,59 +0,0 @@ -# -# htmlhelper.py -# -# A few helper functions for putting wxPython widgets in html pages -# -# Harm van der Heijden, 11 aug 1999. - -import wx -import string -import htmlc - -# Function to parse a param string (of the form 'item=value item2="value etc"' -# and creates a dictionary -def _param2dict(param): - i = 0; j = 0; s = len(param); d = {} - d['param_str'] = param - while 1: - while i=s: break - j = i - while j=s: - break - word = param[i:j] - i=j+1 - if (param[i] == '"'): - j=i+1 - while j tag handler. -# Arguments are the parent (wxHtmlWindow) SWIG pointer (in python, a string) -# and a string containing the parameters. -# The return value must be the SWIG pointer of the created widget (the 'this' -# attribute in python). The widget must be derived from a wxWindow or one -# of its descendants. -def _WidgetStarter(parentptr, param): - # create a python instance of the parent - parent = wx.wxWindowPtr(parentptr) - # try to find the widget class in the htmlwinc (=htmlwidget) module - dict = _param2dict(param) - classname = dict['class'] - obj = htmlc.__dict__[classname] - # now create the class with arguments parent, dictionary - cls = apply(obj, (parent, dict)) - # return the class instance's pointer - return cls.this - -htmlc.WidgetStarter = _WidgetStarter