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

How to define Script-Fu widgets?

This discussion is connected to the gimp-user-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.

4 of 4 messages available
Toggle history

Please log in to manage your subscriptions.

How to define Script-Fu widgets? Milos Prudek 10 Sep 13:04
  How to define Script-Fu widgets? saulgoode@flashingtwelve.brickfilms.com 10 Sep 14:03
   How to define Script-Fu widgets? Milos Prudek 10 Sep 15:23
    How to define Script-Fu widgets? Sven Neumann 10 Sep 18:45
Milos Prudek
2007-09-10 13:04:24 UTC (over 17 years ago)

How to define Script-Fu widgets?

How are the various GUI widgets defined in Script-Fu?

For instance Script-Fu/Decor/Fuzzy border: - Border size GUI widget is a "number with arrows". - Granularity GUI widget is a "slider with arrows".

I look at the fuzzyborder.scm file. These GUI widgets seem to be defined in "(script-fu-register)":

SF-ADJUSTMENT _"Border size" '(16 1 300 1 10 0 1) SF-ADJUSTMENT _"Granularity (1 is Low)" '(4 1 16 0.25 5 2 0)

They are both SF-ADJUSTMENT, so why is the first GUI a "number with arrows" and the second is "slider with arrows"? And what do the numbers (16 1 300 1 10 0 1) mean?

saulgoode@flashingtwelve.brickfilms.com
2007-09-10 14:03:21 UTC (over 17 years ago)

How to define Script-Fu widgets?

Quoting Milos Prudek :

How are the various GUI widgets defined in Script-Fu?

For instance Script-Fu/Decor/Fuzzy border: - Border size GUI widget is a "number with arrows". - Granularity GUI widget is a "slider with arrows".

I look at the fuzzyborder.scm file. These GUI widgets seem to be defined in "(script-fu-register)":

SF-ADJUSTMENT _"Border size" '(16 1 300 1 10 0 1) SF-ADJUSTMENT _"Granularity (1 is Low)" '(4 1 16 0.25 5 2 0)

They are both SF-ADJUSTMENT, so why is the first GUI a "number with arrows" and the second is "slider with arrows"? And what do the numbers (16 1 300 1 10 0 1) mean?

The last argument determines the widget type. The list of numbers corresponds to (respectively):

'initial_value' -- starting value (subsequent calls will use LAST_VALUE instead)
'minimum' -- lowest value possible
'maximum' -- highest value possible
'step_size' -- amount to increment/decrement if clicked with mouse button #1 'page_size' -- amount to increment/decrement if clicked with mouse button #2 'digits' -- the number of decimal places: 0 = integers, 1 = tenths, 2 = hundredths, ...
'widget_type' -- 0 = slider, 1 = spinbutton

@ Sven Neumann, thanks for clarifying how the interaction mode works.

Milos Prudek
2007-09-10 15:23:53 UTC (over 17 years ago)

How to define Script-Fu widgets?

The last argument determines the widget type. The list of numbers corresponds to (respectively):

Wow. Thank you. Is this documented somewhere?

Should not it be published at http://www.gimp.org/tutorials/Basic_Scheme/ ?

Sven Neumann
2007-09-10 18:45:29 UTC (over 17 years ago)

How to define Script-Fu widgets?

Hi,

On Mon, 2007-09-10 at 15:23 +0200, Milos Prudek wrote:

Wow. Thank you. Is this documented somewhere?

It is documented in test-sphere.scm which is distributed with the source code. It would be nice if someone turned this into a document that we could publish on gimp.org.

Sven