Questions about KPart integration inside KHTML
Koos Vriezen
koos.vriezen at xs4all.nl
Fri Feb 7 17:42:39 GMT 2003
On Wed, 5 Feb 2003, Greg Langmead wrote:
> Hi. I have a couple of specific technical questions about the
> capabilities of KPart within Konq/KHTML, and I'm hoping someone here
> can help me or point me to the right documentation. The pages I've
> looked at don't quite address my particular concerns.
>
> First, is it possible to have a KPart set up to handle certain XML
> nodes, rather than entire files? All the examples in the docs are
> centered around plug-ins and image viewers for separate files, but I'm
> interested in extending the browser to support XML data that it doesn't
> support natively (good examples would be SVG and MathML). My KPart
> would need to be somehow activated to render these nodes, and have
> access to the node's XML. If necessary, I could add the constraint
> that the nodes I want to render are all given some specific namespace
> prefix in the XML source.
>
> Secondly, how tightly integrated can a KPart be inside a KHTML widget?
> To do a good job of integrating, I'd need to be able to query the
> ambient KHTML widget for the current font at each of my KPart's
> instances, as well as the current font size and text baseline. Again,
> the docs seem focused on plugins, which are loosely integrated and
> don't depend on their environment.
I think you would like to look at ksvg from the kdenonbeta package.
> Finally, it seemed from the docs like a KPart can determine its own
> size, and I wanted to verify that this is the case. Netscape plugins
> run in a rectangular area specified directly in the HTML but my KPart
> would need to tell the page renderer what its size is.
I just fixed my KMPlayer to use javascript for resizing the part
'this.setAttribute("width", xxx); this.setAttribute("height", yyy);
using the KPart::LiveConnectExtension::partEvent. Unfortunately this only
works for KDE-3.1.1 or higher.
Regards,
Koos Vriezen
>
> Thanks for any pointers.
>
> Greg Langmead
>
>
More information about the kfm-devel
mailing list