
This is a prerelease of the GimpPreview and GimpPluginWindow widgets.
These widgets are intended to help standardize plugins and provide an
easier method to create previews.

I am not yet 100% satisfied with the widgets, as I know of a couple
bugs, but I figured I am far enough to accept patches if anyone would
like to help.

The demo 'blur.c' is very not-so-greatly done as of yet, and very 
very buggy.  Mostly not even implemented in fact.  But it should
help in getting the point across, and when I have more time it will
get better.

GimpPluginWindow
----------------

GimpPluginWindow replaces the direct usage of GtkWindow.  It puts
standard buttons in the correct place.  Usage of GimpPluginWindow
is the same as GtkWindow, in that it is derived from GtkWindow and
you simply use gtk_container_add() to add a widget to the window.

Two signals are provided for GimpPluginWindow, "clicked_ok" and 
"clicked_cancel".  These are the associated directly with the 
clicked signal of the Ok/Cancel buttons.

The help button is currently unused, but the intent there is too allow
the plugin to give the plugin window a URL which will make netscape
do a netscape --remote, or bring up some other help system gimp has
been configured to use.  Connecting directly to the help button clicked
signal will not be allowed, for consistancy.  If no URL is given, the
help button simply won't show up.

GIMP plugin windows can by different types.  Actually right now just one,
but that's going to change.  Right now that type is GIMP_PLUGIN_NORMAL.
Others might be GIMP_PLUGIN_WIDE, GIMP_PLUGIN_LANDSCAPE, etc.  My intent
is for them to get written as needed.

GimpPreview
-----------

This is where most of the meat and fun are.  The preview widget is 
scalable and pannable.  It takes care of the panning invisible to 
the plugin and provides a scaled version of data for the plugin to
mutate.  

The plugin needs to connect to the 'update_preview' signal.  When
that signal is received, the plugin should update the preview using
gimp_preview_draw_row() with a filtered version.  The plugin must
do this very quickly or use gtk_idle_add and do it a piece at a time
so the interface remains responsive.  

The preview hands a scaled version converted to RGBA.  Providing 
other image types depending on the image's actual type would be
a good idea, but is not implemented.  But plugins should always
be given an RGBA version so the plugin does not have to put much 
effort into conversion if RGBA can be used easily.

I can't think of much more.  The widget is supposed to be as easy
to use as possible, and I think I've achieved that.

If you create patches, send them to me, I'll be actively maintaining
this stuff.

--
Shawn T. Amundson
amundson@gimp.org

