Wrapper for Richard Hipp's Tkhtml widget
========================================
Rev 0.10: Initial release
This is a very thin wrapper around the Tkhtml widget by Richard hipp.
Its sole purpose is to bring the build process into the CriTcl system.
Building this extension takes a little bit of preparation:
- get the Tkhtml distribution and unpack it as ./tkhtml/
- you need to create separately buildable C headers and sources:
mkdir tkhtml.bld
cd tkhtml.bld
../tkhtml/configure
(this may fail, e.g. if Tcl/Tk headers are not found)
make srcdir
- the result is a directory with all necessary sources copied over
(note that we do not use the provided build, we just get sources)
- now go to the critlib area, and do a "cd rhtml_c"
- this area contains symbolic links which you need to adjust, e.g.:
ln -sf the_above_dir_path/tkhtml.bld/srcdir/* .
- this resets the symlinks, but you need one more adjustment:
mv -f htmlwidget.c rhtmlwidget.c
- now, fix the symlinks to the tk*.h headers:
ln -sf my_tk_source_tree/generic/tk.h
ln -sf my_tk_source_tree/generic/tkDecls.h
ln -sf my_tk_source_tree/generic/tkIntXlibDecls.h
- one last change is to adjust the location of the X11 libs, if they
are not in /usr/X11R6/lib/libX11.* - see the code in rhtml.tcl:
critcl::clibraries -L/usr/X11R6/lib -lX11
Phew, that's it. CriTcl should now be able to build the Tkhtml widget.
The command gets inited and defined slightly differently, but there is
no difference once the package loads. The way to use this package is:
package require rhtml
html ?args ...?
The source code of the Tkhtml extension is available from DRH's site:
http://www.hwaci.com/
There's also a modified version in the BrowseX app by Peter MacDonald:
http://www.browsex.com/
That version has not yet been tried (it has some changes/dependencies).
One of the things this CriTcl extension demonstrates, is how to set up
the Tk stubs table without changes to the (Tk-unaware) CriTcl code, in
a way which also does not require the "libtkstub8.4.a" binary code.
The trick used to do this is documented in the code, see "rhtml.tcl".