Re: [Gimp-user] How to define Script-Fu widgets?

2007-09-10 Thread Sven Neumann
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


___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] How to define Script-Fu widgets?

2007-09-10 Thread Milos Prudek
> 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/ ?

-- 
Milos Prudek
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] How to define Script-Fu widgets?

2007-09-10 Thread saulgoode
Quoting Milos Prudek <[EMAIL PROTECTED]>:

> 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.

___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user