RSS/Atom feed Twitter
Site is read-only, email is disabled

Preview widget for plugins

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

6 of 6 messages available
Toggle history

Please log in to manage your subscriptions.

Preview widget for plugins Maurits Rijk 05 Apr 20:40
  Preview widget for plugins Sven Neumann 06 Apr 15:10
  Preview widget for plugins Dov Grobgeld 07 Apr 09:05
   Preview widget for plugins Sven Neumann 09 Apr 13:15
Preview widget for plugins Maurits Rijk 07 Apr 10:02
Preview widget for plugins Maurits Rijk 07 Apr 11:17
Maurits Rijk
2002-04-05 20:40:39 UTC (about 22 years ago)

Preview widget for plugins

Ok, this has been discussed numerous times and seems to be quite high on the wishlist but it still doesn't really exist: a preview widget that can be used in all (or probably most) plug-ins.

So I've taken up this challenge and started coding, heavily based on some work that has already been done in this area. However my approach is slightly different: instead of coding a perfect preview widget from the start I opted for the evolutionary approach:

Step 1) first create a quick and dirty preview widget that really consists of code factored out from several plugins. This code relies on the deprecated GtkPreview widget. Main advantage of having this step is that it doesn't involve a lot of rewriting of the existing plugin code. This step has been succesful: I have changed the code from the max_rgb and the plasma plugin so they now both use my new preview widget.

Step 2) update all plugins that already have a preview. Some of them will be easy, others might involve more rewriting or adding functionality to the preview widget.

Step 3) once all plugins use the same preview widget it's time to replace the deprecated GtkPreview by another widget (GtkImage or GtkDrawingArea). In this step the API should be well established and be able to handle all preview needs.

Step 4) update plugins that don't have a preview yet.

So what's the current status? Well, I've finished step 1 and it seems to work :) Step 2 will take quite a bit more time, but will greatly clean up and reduce the current plugin code for all those plugins that use a preview. I expect this to take about 2 or 3 months. Step 3 will be relatively easy. Few evenings of hacking should be enough to do this. And finally, step 4, will be comparable with step 2: about 2 or 3 months.

To sum up: before the end of the year all plugins for which this is appropriate will have a preview, using a common preview widget. I just hope Gimp 1.4 isn't already released before that time :)

Any thoughts?

Maurits

Sven Neumann
2002-04-06 15:10:33 UTC (about 22 years ago)

Preview widget for plugins

Hi,

Maurits Rijk writes:

Ok, this has been discussed numerous times and seems to be quite high on the wishlist but it still doesn't really exist: a preview widget that can be used in all (or probably most) plug-ins.

So I've taken up this challenge and started coding, heavily based on some work that has already been done in this area. However my approach is slightly different: instead of coding a perfect preview widget from the start I opted for the evolutionary approach:

Step 1) first create a quick and dirty preview widget that really consists of code factored out from several plugins. This code relies on the deprecated GtkPreview widget. Main advantage of having this step is that it doesn't involve a lot of rewriting of the existing plugin code. This step has been succesful: I have changed the code from the max_rgb and the plasma plugin so they now both use my new preview widget.

it's fine to temporarily use GtkPreview if you don't expose this fact thru the API.

Step 2) update all plugins that already have a preview. Some of them will be easy, others might involve more rewriting or adding functionality to the preview widget.

Step 3) once all plugins use the same preview widget it's time to replace the deprecated GtkPreview by another widget (GtkImage or GtkDrawingArea). In this step the API should be well established and be able to handle all preview needs.

Step 4) update plugins that don't have a preview yet.

So what's the current status? Well, I've finished step 1 and it seems to work :) Step 2 will take quite a bit more time, but will greatly clean up and reduce the current plugin code for all those plugins that use a preview. I expect this to take about 2 or 3 months. Step 3 will be relatively easy. Few evenings of hacking should be enough to do this. And finally, step 4, will be comparable with step 2: about 2 or 3 months.

actually, I expect Step 3 to take less than 20 minutes. Just go ahead and introduce a preview widget based on GtkPreview and we'll port it to GtkDrawingArea for you.

To sum up: before the end of the year all plugins for which this is appropriate will have a preview, using a common preview widget. I just hope Gimp 1.4 isn't already released before that time :)

We definitely aim for a GIMP-1.4 release before the end of this year but I believe we can finish the plug-in preview task in this time schedule. What about sending a mail with the proposed API to the list so people are able to comment on it?

Salut, Sven

Dov Grobgeld
2002-04-07 09:05:10 UTC (about 22 years ago)

Preview widget for plugins

Though I am not very familiar with the current preview widget, it seems to me that my GtkImageViewer widget would be well suited for this task.

Please have a look at:

http://imagic.weizmann.ac.il/~dov/freesw/gtk/gtk-image-viewer/

Regards, Dov

On Fri, Apr 05, 2002 at 08:40:39PM +0200, Maurits Rijk wrote:

Ok, this has been discussed numerous times and seems to be quite high on the wishlist but it still doesn't really exist: a preview widget that can be used in all (or probably most) plug-ins.

So I've taken up this challenge and started coding, heavily based on some work that has already been done in this area. However my approach is slightly different: instead of coding a perfect preview widget from the start I opted for the evolutionary approach:

Step 1) first create a quick and dirty preview widget that really consists of code factored out from several plugins. This code relies on the deprecated GtkPreview widget. Main advantage of having this step is that it doesn't involve a lot of rewriting of the existing plugin code. This step has been succesful: I have changed the code from the max_rgb and the plasma plugin so they now both use my new preview widget.

Step 2) update all plugins that already have a preview. Some of them will be easy, others might involve more rewriting or adding functionality to the preview widget.

Step 3) once all plugins use the same preview widget it's time to replace the deprecated GtkPreview by another widget (GtkImage or GtkDrawingArea). In this step the API should be well established and be able to handle all preview needs.

Step 4) update plugins that don't have a preview yet.

So what's the current status? Well, I've finished step 1 and it seems to work :) Step 2 will take quite a bit more time, but will greatly clean up and reduce the current plugin code for all those plugins that use a preview. I expect this to take about 2 or 3 months. Step 3 will be relatively easy. Few evenings of hacking should be enough to do this. And finally, step 4, will be comparable with step 2: about 2 or 3 months.

To sum up: before the end of the year all plugins for which this is appropriate will have a preview, using a common preview widget. I just hope Gimp 1.4 isn't already released before that time :)

Any thoughts?

Maurits

Maurits Rijk
2002-04-07 10:02:50 UTC (about 22 years ago)

Preview widget for plugins

Dov Grobgeld wrote:

Though I am not very familiar with the current preview widget, it seems to me that my GtkImageViewer widget would be well suited for this task.

Please have a look at:

http://imagic.weizmann.ac.il/~dov/freesw/gtk/gtk-image-viewer/

Regards, Dov

Thanks, I am going to have a look at your widget.

Maurits

Maurits Rijk
2002-04-07 11:17:08 UTC (about 22 years ago)

Preview widget for plugins

Sven Neumann wrote:

actually, I expect Step 3 to take less than 20 minutes. Just go ahead and introduce a preview widget based on GtkPreview and we'll port it to GtkDrawingArea for you.

Well, because of my gf and little daughter 20 minutes might be all the time I get to spend in a few evenings :)

We definitely aim for a GIMP-1.4 release before the end of this year

!!!!

but I believe we can finish the plug-in preview task in this time schedule. What about sending a mail with the proposed API to the list so people are able to comment on it?

I will as soon as it has stabelized a bit. Right now it's based on 2 plugins (max_rgb and plasma) and I'm working on a third (wind). When the preview widget fullfills the need of 5 different plugins I will publish the API here, probably by the end of this week.

Salut, Sven

Kind regards,

Maurits

Sven Neumann
2002-04-09 13:15:26 UTC (about 22 years ago)

Preview widget for plugins

Hi,

Dov Grobgeld writes:

Though I am not very familiar with the current preview widget, it seems to me that my GtkImageViewer widget would be well suited for this task.

Please have a look at:

http://imagic.weizmann.ac.il/~dov/freesw/gtk/gtk-image-viewer/

this migth be nice to base the gtk+/gdk part of our widget on, but the hard part of the plug-in preview widget is not how to display the preview but how to provide an API that allows the plug-in developer to use the same code for rendering the effect on the image and on the preview. To achieve this goal, the preview widget probably should provide the drawable API.

Salut, Sven