carlback:
> With ASV down the drain soon how hard with it be to package up the
> squiggle browser as some sort of browser plugin?
>
> http://xmlgraphics.apache.org/batik/svgviewer.html
Ruud just asked me this same question. This is what I said:
Mmm, well I have thought of such a thing in the past. I managed to
implement a Netscape plugin which, when loaded in a web page, would
replace its own 'object' element with a corresponding 'applet' element
that loaded Batik in the applet. It's a bit hacky, because it modifies
the document, but it seemed to work. The advantage of having an actual
applet in the document is that scripting it from the HTML works
easily.
Unfortunately the Netscape plugin interface isn't supported by IE any
more, so I'd have to write an ActiveX control I think, and I have no
idea how to do that! Also I don't know if it's possible with ActiveX
controls to access the containing HTML document (to do the applet
hack).
I think the cleanest solution would be to compile Batik with gcj
and GNU classpath (which can apparently be done now!), and use
Batik's rendering code from an ActiveX control and paint the control
properly. I think this might be a lot of work though: all of the Swing
component oriented code (event handling, painting) would have to be
reimplemented for the ActiveX control. I think it is possible, but I
have no idea how to write ActiveX controls.
but I think I was over-optimistic: I don’t think GNU Classpath is
actually up to the task of compiling Batik. I guess another possibility
would be for the ActiveX control to spawn a VM and interact with Batik
objects to get the graphics to paint.
If anyone has any tutorials/walk-throughs of writing ActiveX controls,
I’d be interested to read them.
--
Cameron McCormack, http://mcc.id.au/
xmpp:heycam@... â–ª ICQ 26955922 â–ª MSN cam@...