> Thanks for getting it to run. I assume all the commented out variables
> were just to get rid of warnings. Do you happen to know how I could make
> it so that it only sometimes includes its own definition of
> get_current_dir?
autoconf can do this. my automake kung fu is weak, so i'm not sure how.
> Thanks for looking at it. I'm interested to hear any news about what's
> going on in gwp. One of my main questions is how the plugin system
> works.
the way gwp plugins work is this:
after gmodule loads a plugin, gwp looks for a function called
wp_plugin_fill_vtable in the shared library. if it isn't there, gwp
assumes that this isn't a plugin it wants. if gwp finds that
function, it's called.
wp_plugin_fill_vtable sets a bunch of function pointers. one of the
pointers set is newUI. when a new gwp window is created, it calls
each plugin's newUI function. at that point, the plugins can create
new menu items or toolbars or windows or whatever.
look at gwp/plugins/doc/wordcount.C for a simple example.
there is another twist to gwp plugins:
i'm trying to please 2 crowds with gwp. one of them wants to just set
fonts and sizes and insert pictures and spell check it.
the other wants the editor to keep track of document structure. they
are less interested in which fonts/sizes are being used, as long as
they can set a font for a (logical) type of text (such as chapter header).
what it comes down to is that some types of documents need specialized
code acting as shepherd while the document is being edited -- otherwise
the document may not be savable.
when a new document is created, a window is popped up asking for the
type of document. the list of possible document types is generated by
checking each plugin for a canNew function.
the plugin that is selected becomes the document's primary plugin, and
all editing is routed through that plugin. this allows the plugin to
keep the document structure such that it will be savable.
gwp/plugins/io/gwpIO.C is an example of this sort of plugin.
(actually, it's the only one that works at the moment. i'll get
around to fixing the others).
other plugins can still be used on the document, because newUI was
called on all of the plugins, not just the primary one. again,
wordcount.C is an example of this. wordCount:newUI inserts a menu
item under tools, which will activate the plugin on the current
document (regardless of the document's primary plugin).
does that make sense?
I'm interested in making another plugin interface to gwp that looks a
lot like the DOM stuff. If you used the DOM interface for GO plugins,
i suspect we could share plugins.
-seth
----
Mailing-list gwp@rufus.w3.org
To unsubscribe: echo "unsubscribe gwp" | mail majordomo@rufus.w3.org