Re: Need Some idea

On Thu, 2003-07-17 at 14:52, Pouria Masoudi wrote:
> Hi every one,
> we bonoboized partially gtkmathview,a GTK widget for rendering and
> editing MathML markup.
> Well for now we have just implemented the Control and PresistFile
> interfaces,I would like to ask if some one have some idea about other
> intresting interfaces i can implement or have other nice ways of
> combining this components with Bonobo-aware applications.

I want to embed MathML inside Conglomerate (

I have a custom widget that renders XML in a pretty way in a custom
canvas system.

I have GObjects that take charge of rendering each node in the XML tree,
and so I can hand over control over subtrees of the XML tree to custom
renderers where I know about specifics of the DTD - MathML is a perfect

My XML tree is a tree of libxml2 nodes stored in-process in the main
app.  It is wrapped by a GObject which emits signals when changes occur.

So there are two issues I have with a component-based approach:

(i) Embedding as a control vs as a "canvas item"
Although I don't support it yet, I can probably allow GtkWidgets to be
used directly in my custom canvas.  So I can extend this to allow Bonobo
controls fairly easily.  But it will look nicer if there's some kind of
interface that assumes some kind of arbitrary canvas.

(ii) The DOM tree
We need some way for the DOM representation to "cross the process
boundary", so that it can be traversed by a component, changed, and
change notifications can occur.  This is a hard problem.

There were some interesting postings on this topic on the abiword-dev
mailing list  (on July 9th, looking at my archives), which covered lots
of similar material.

A simpler approach might be to simply build a plugin for my app that
links with your MathML code and hence brings everything into the same

IIRC, gtkmathview is based on GTK 1.*    Am I correct? If so then I
believe a GTK 2.* port of gtkmathview would be more useful to me for
less of your effort than a bonobo-isation.

Some questions:

(i) Am I right in thinking that by implementing the PersistFile
interface you can load/save the XML source of the MathML from/to a
file?  You might be able to fake things by implementing PersistStream so
that you can load/save XML source to a stream.  If the container
implements that stream w.r.t. to a DOM tree in its own address space,
parsing the XML it receives and updating things accordingly it might
just work.  It would be an evil, error-prone hack, though.

(ii) Does Bonobo allow me to embed widgets created using GTK1.* inside a
container built using GTK2.* ?

Hope the above makes sense!

David Malcolm

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]