It is currently Sat Aug 15, 2026 5:31 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 70 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject: Re: Script-Fu User Entry Screen Scroll-bars?
PostPosted: Tue Dec 24, 2013 7:52 am  (#21) 
Offline
Global Moderator
User avatar

Joined: May 16, 2010
Posts: 16158
saulgoode wrote:
Rod wrote:
Tabs in dialogs would be an excellent idea i think. How would you categorize them though so that they would be fluent in all written scripts?

I would just add an SF-PAGE option to the script-fu-register procedure.

For example (using the Lighting Effects tabs):
SF-PAGE "Options" 0
SF-IMAGE "image" 0
:
:
SF-PAGE "Light" 0
:
:
SF-PAGE "Material" 0
:
:
SF-PAGE "Bump Map" 0
:
:
SF-PAGE "Environment" 0
:


So under each page would be the actual procedures such as...
SF-PAGE "LAYER MODES" 3 ; 3 being third tab
  SF-OPTION "Highlight Mode (recomend screen)" '("Screen"     ; 0
                          "Dissolve"   ; 1
                          "Multiply"   ; 3
                          "Divide"     ; 15
                          "Normal"     ; 4
                          "Overlay"    ; 5
                          "Dodge"      ; 16
                          "Burn"       ; 17
                          "Hard light" ; 18
                          "Soft light" ; 19
                          "Grain extract" ; 20
                          "Grain merge" ; 21
                          "Difference" ; 6
                          "Addition"   ; 7
                          "Subtract"  ; 8
                          "Darken only" ; 9
                          "Lighten only" ; 10
                          "Hue" ; 11
                          "Saturation" ; 12
                          "Color" ; 13
                          "Value" ; 14
                          )
SF-OPTION "Shadow Mode(recomend Multiply)" '("Multiply"     ; 0
                          "Dissolve"   ; 1
                          "Normal"   ; 3
                          "Divide"     ; 15
                          "Screen"     ; 4
                          "Overlay"    ; 5
                          "Dodge"      ; 16
                          "Burn"       ; 17
                          "Hard light" ; 18
                          "Soft light" ; 19
                          "Grain extract" ; 20
                          "Grain merge" ; 21
                          "Difference" ; 6
                          "Addition"   ; 7
                          "Subtract"  ; 8
                          "Darken only" ; 9
                          "Lighten only" ; 10
                          "Hue" ; 11
                          "Saturation" ; 12
                          "Color" ; 13
                          "Value" ; 14
                          )
)


Something like that?

_________________
Image


Top
 Post subject: Re: Script-Fu User Entry Screen Scroll-bars?
PostPosted: Tue Dec 24, 2013 8:54 am  (#22) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4812
GnuTux wrote:
Well, if that is true, it's laughably misguided that scroll bars have been omitted because Script-Fu's UI has been intentionally "kept simple". I actually doubt that is the case. Heck, I can't even get some of GIMP's Built-in Logo scripts, like Glossy, to fit on the screen and I have decent resolution. This issue is exacerbated when one is working with even lower resolution displays, such as 1024x768. Why would some Script-fu scripts, that many users can't even see on the screen, be included in GIMP? It just doesn't make sense. It's not like we need 100's of inputs, anyway. How about 15-20, which would cover very basic functionality?

If it is true, whoever made that decision should be severely beaten around the face and head, so as to have some common sense slapped into them. :hehe


This would also apply to someone who considers usable of a piece of software with over 16 settings (*) that you cannot test interactively, and for which you cannot even set context-sensitive default values?

(*) What seems to fit in a 768-pixels-high dialog, some of them being higher that the standard (PF_TEXT,PF_RADIO) on the dialog I used to test (DemoGUI).

_________________
Image


Top
 Post subject: Re: Script-Fu User Entry Screen Scroll-bars?
PostPosted: Tue Dec 24, 2013 9:00 am  (#23) 
Offline
Global Moderator
User avatar

Joined: May 16, 2010
Posts: 16158
This would be absolutely marvelous. :)
But what page (if any), would SF-IMAGE and SF_DRAWABLE fall under?
SF-IMAGE "The Image" 0
SF-DRAWABLE "The Layer" 0
;SF-PAGE "" 0


;SF-PAGE "" 0


;SF-PAGE "" 0


;SF-PAGE "" 0

   



SF-PAGE "Material" 1
  SF-ADJUSTMENT "Grain Amount" '(7 0 255 1 10 0 SF-SLIDER)
  SF-ADJUSTMENT "Grain Angle" '(90 0 360 1 10 0 SF-SPINNER)
  SF-ADJUSTMENT "Grain Blur" '(45 0 250 1 10 0 SF-SPINNER) 

SF-PAGE "Bevelling" 2
  SF-ADJUSTMENT "Bevel Size" '(23 1 250 1 10 0 SF-SLIDER)

SF-PAGE "Layer Modes" 3
  SF-OPTION "Highlight Mode (recommend screen)" '("Screen"     ; 0
                          "Dissolve"   ; 1
                          "Multiply"   ; 3
                          "Divide"     ; 15
                          "Normal"     ; 4
                          "Overlay"    ; 5
                          "Dodge"      ; 16
                          "Burn"       ; 17
                          "Hard light" ; 18
                          "Soft light" ; 19
                          "Grain extract" ; 20
                          "Grain merge" ; 21
                          "Difference" ; 6
                          "Addition"   ; 7
                          "Subtract"  ; 8
                          "Darken only" ; 9
                          "Lighten only" ; 10
                          "Hue" ; 11
                          "Saturation" ; 12
                          "Color" ; 13
                          "Value" ; 14
                          )
  SF-OPTION "Shadow Mode(recommend Multiply)" '("Multiply"     ; 0
                          "Dissolve"   ; 1
                          "Normal"   ; 3
                          "Divide"     ; 15
                          "Screen"     ; 4
                          "Overlay"    ; 5
                          "Dodge"      ; 16
                          "Burn"       ; 17
                          "Hard light" ; 18
                          "Soft light" ; 19
                          "Grain extract" ; 20
                          "Grain merge" ; 21
                          "Difference" ; 6
                          "Addition"   ; 7
                          "Subtract"  ; 8
                          "Darken only" ; 9
                          "Lighten only" ; 10
                          "Hue" ; 11
                          "Saturation" ; 12
                          "Color" ; 13
                          "Value" ; 14
                          )                
)

_________________
Image


Top
 Post subject: Re: Script-Fu User Entry Screen Scroll-bars?
PostPosted: Tue Dec 24, 2013 10:06 am  (#24) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5241
Location: Gimpville
saulgoode wrote:
Scrolling of the controls within a dialog is not consistent with traditional human interface guidelines. Does anybody have an example of this being done? F-Spot has a scrolling toolbox, which in itself is ugly enough; but I have never seen a scrolling dialog.

Yeah, most of the desktop apps that I use don't make use of a lot of input forms but normally, when you resize a window (or have a smaller resolution display) and there are forms/dialogs, scroll bars appear to allow you to get to those entry fields. Even in GIMP, we see this kind of thing. For example, with the paint brush (and other dialogs). When there isn't enough room on the screen, scroll bars appear.

Image

Of course, scrolling forms and dialogs are a way of life in the web browser and on smart phone & tablets. Certainly, most flavors of C have the ability to create scrollable forms but as you say, there are varying schools of thought on whether it's best to present a scrolling form or multiple screens/tabs.

I guess I can understand why the Script-fu dialog was designed as it was, back in the day, but it does seem like there could be room for improvement now. I'm not sure what the best approach would be. My initial thought was that a scrolling form might be a good option, but I do like the idea of tabs. Truthfully, I'd be happy with any way to get a few more items on the Script-Fu UI. :hehe

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


Top
 Post subject: Re: Script-Fu User Entry Screen Scroll-bars?
PostPosted: Tue Dec 24, 2013 10:20 am  (#25) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5241
Location: Gimpville
ofnuts wrote:
This would also apply to someone who considers usable of a piece of software with over 16 settings (*) that you cannot test interactively, and for which you cannot even set context-sensitive default values?

(*) What seems to fit in a 768-pixels-high dialog, some of them being higher that the standard (PF_TEXT,PF_RADIO) on the dialog I used to test (DemoGUI).

Well, I was mainly speaking to the idea that we are given default scripts in GIMP that can't be used unless we have a display with a high enough resolution. There are certainly limitations as to what Script-Fu currently provides, but that doesn't mean it can't, or shouldn't, be improved, nor does it mean that it should be summarily abandoned in favor of somethings else.

I will concede that there does come a point to where one would need to abandon Script-Fu for a more robust development environment, but that doesn't necessarily mean Python would be the better alternative. ;)

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


Top
 Post subject: Re: Script-Fu User Entry Screen Scroll-bars?
PostPosted: Tue Dec 24, 2013 10:25 am  (#26) 
Offline
Global Moderator
User avatar

Joined: May 16, 2010
Posts: 16158
Quote:
Truthfully, I'd be happy with any way to get a few more items on the Script-Fu UI.

Me too Tux. :)
Mainly though i would be happy to be able to adjust the scripts written by other folks that my res can't see. Just by adding the procedure for SF-PAGE would do it.

Saulgoode is this procedure already available and can it be turned/switched on?

_________________
Image


Top
 Post subject: Re: Script-Fu User Entry Screen Scroll-bars?
PostPosted: Tue Dec 24, 2013 10:28 am  (#27) 
Offline
Script Coder
User avatar

Joined: Nov 06, 2012
Posts: 239
Location: Italy
saulgoode wrote:
Scrolling of the controls within a dialog is not consistent with traditional human interface guidelines. Does anybody have an example of this being done?

In this regard, I am reminded of G'MIC, where you can see that, when the selected filter is from among those provided with a large amount of settings, the right dialog box becomes scrollable if necessary.

_________________
Gino D's GIMP scripts: https://sites.google.com/site/ginodonig/gimp-scripts


Top
 Post subject: Re: Script-Fu User Entry Screen Scroll-bars?
PostPosted: Tue Dec 24, 2013 10:56 am  (#28) 
Offline
GimpChat Member
User avatar

Joined: Nov 16, 2011
Posts: 5127
Location: Metro Vancouver, BC
fluffybunny wrote:
GnuTux wrote:
Found this for Windows..
http://lib.umhs-sk.net/keybshortc.pdf

ALT+ SPACEBAR + M = Move current windows with arrow keys
ALT+ SPACEBAR + M + any arrow key once, then move the mouse to position the window where you like.

Yes moving it around to see it works fine, but as soon as you click on the window to enter a value, it snaps back with the Windows Title bar aligned with the top of monitor as I said previously in this thread.
When you use the above method or below method to move a dialog box, does using the tab key (rather than the mouse), to select options make any difference?

1. Right click the Menu bar -> select Move.
2. Use the arrow keys to move the window.
3. Left click the Menu bar to release.

_________________
Image
Gimp 2.8.18, Linux, median user
Gimp Chat Tutorials Index
Spirit Bear (Kermode)


Top
 Post subject: Re: Script-Fu User Entry Screen Scroll-bars?
PostPosted: Wed Dec 25, 2013 8:17 am  (#29) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
I make a :wow noticing 2 proposed , and already functional improvement for the python script interface
Not only that but was that to cause my :wow

now here we are talking of script fu not of python so i only give the link
viewtopic.php?f=9&t=9378&start=0

Anyway if the python module may be modified maybe are possible modification also for script fu..at least to fix the scroll bug , or allow double columns when space is insufficient

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
 Post subject: Re: Script-Fu User Entry Screen Scroll-bars?
PostPosted: Wed Dec 25, 2013 7:56 pm  (#30) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
Rod wrote:
This would be absolutely marvelous. :)
But what page (if any), would SF-IMAGE and SF_DRAWABLE fall under?
SF-IMAGE "The Image" 0
SF-DRAWABLE "The Layer" 0
;SF-PAGE "" 0
:
:


SF-IMAGE and SF-DRAWABLE are treated specially when they are the first arguments passed to a script, so they should appear at the beginning (typically). There would be an advantage to having them appear before the first SF-PAGE (as you show), but it might be a little tedious to explain the reason.

Rod wrote:
Quote:
Truthfully, I'd be happy with any way to get a few more items on the Script-Fu UI.

Me too Tux. :)
Mainly though i would be happy to be able to adjust the scripts written by other folks that my res can't see. Just by adding the procedure for SF-PAGE would do it.

Saulgoode is this procedure already available and can it be turned/switched on?

No, it is not available. It would need to be written.

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: Script-Fu User Entry Screen Scroll-bars?
PostPosted: Thu Dec 26, 2013 9:27 am  (#31) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5241
Location: Gimpville
Saulgoode, do you think this is a project worth pursuing? I'd be happy to contribute with tracing, coding, documenting or whatever might be necessary to make it happen.

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


Top
 Post subject: Re: Script-Fu User Entry Screen Scroll-bars?
PostPosted: Thu Dec 26, 2013 1:46 pm  (#32) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
GnuTux wrote:
Saulgoode, do you think this is a project worth pursuing? I'd be happy to contribute with tracing, coding, documenting or whatever might be necessary to make it happen.

Yes. Now might be a good time to tackle this as the code will necessarily need updating for the GIMP version after 2.10 (because of the switch to GTK 3). By "now", I mean next year -- I've got some obligations that are going to tie me up until after the holidays.

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: Script-Fu User Entry Screen Scroll-bars?
PostPosted: Thu Dec 26, 2013 3:38 pm  (#33) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5241
Location: Gimpville
That sounds great, Saul. Could you direct me toward some relevant bits of source code to peruse in the interim.

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


Top
 Post subject: Re: Script-Fu User Entry Screen Scroll-bars?
PostPosted: Thu Dec 26, 2013 4:01 pm  (#34) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
The first thing is to understand what Script-fu calls the "standard function arguments" (sometimes referred to as 'sfa' in the docs). Basically, if the first arguments in the registration are among SF-DISPLAY, SF-IMAGE, SF-DRAWABLE, SF-CHANNEL, SF-LAYER, or SF-VECTORS then there is no widget drawn for them and they get assigned their values from the corresponding active item. This is why you typically see the following code in the 'script-fu-register' call:
  SF-IMAGE    "Image"    0
  SF-DRAWABLE "Drawable" 0

Note that these arguments will result in widgets if they appear later in the registration.

These standard arguments are "counted" in the function 'script_fu_script_collect_standard_args()' in the script-fu-scripts.c file.

In the same file, the function 'script_fu_script_proc()' then determines if a dialog box needs to be created based on the run-mode and whether there are any non-standard arguments.

The dialog box itself is created by the function 'script_fu_interface()' in the file script-fu-interface.c -- this is where all the GTK widgets are defined and callbacks get assigned to update the corresponding PDB argument value. This function would need to be modified to set up tabbed pages and to place the argument widgets appropriately on those pages.

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: Script-Fu User Entry Screen Scroll-bars?
PostPosted: Thu Dec 26, 2013 4:18 pm  (#35) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4812
saulgoode wrote:
The first thing is to understand what Script-fu calls the "standard function arguments" (sometimes referred to as 'sfa' in the docs). Basically, if the first arguments in the registration are among SF-DISPLAY, SF-IMAGE, SF-DRAWABLE, SF-CHANNEL, SF-LAYER, or SF-VECTORS then there is no widget drawn for them and they get assigned their values from the corresponding active item. This is why you typically see the following code in the 'script-fu-register' call:
  SF-IMAGE    "Image"    0
  SF-DRAWABLE "Drawable" 0

Note that these arguments will result in widgets if they appear later in the registration.

These standard arguments are "counted" in the function 'script_fu_script_collect_standard_args()' in the script-fu-scripts.c file.

In the same file, the function 'script_fu_script_proc()' then determines if a dialog box needs to be created based on the run-mode and whether there are any non-standard arguments.

The dialog box itself is created by the function 'script_fu_interface()' in the file script-fu-interface.c -- this is where all the GTK widgets are defined and callbacks get assigned to update the corresponding PDB argument value. This function would need to be modified to set up tabbed pages and to place the argument widgets appropriately on those pages.


If anyone is tweaking this code: the one thing these dialog miss IMHO is some way to set value defaults (and ranges, for sliders/spinners) that are adequate for the image...

_________________
Image


Top
 Post subject: Re: Script-Fu User Entry Screen Scroll-bars?
PostPosted: Thu Dec 26, 2013 4:49 pm  (#36) 
Offline
Global Moderator
User avatar

Joined: May 16, 2010
Posts: 16158
I agree with Ofnuts. We also need to tweak the input for text to be able to stack it instead of one long text line. By stack it i mean sort of the way the tag <BR> works in HTML. Just to create a break. This could result in a smaller width for dialogs also. A few things could be fixed while it's being re vamped. :)

_________________
Image


Top
 Post subject: Re: Script-Fu User Entry Screen Scroll-bars?
PostPosted: Thu Dec 26, 2013 6:17 pm  (#37) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4812
Rod wrote:
I agree with Ofnuts. We also need to tweak the input for text to be able to stack it instead of one long text line. By stack it i mean sort of the way the tag <BR> works in HTML. Just to create a break. This could result in a smaller width for dialogs also. A few things could be fixed while it's being re vamped. :)

There are two text input widgets, PF_STRING and PF_TEXT. What you want is PF_TEXT.

_________________
Image


Top
 Post subject: Re: Script-Fu User Entry Screen Scroll-bars?
PostPosted: Thu Dec 26, 2013 6:27 pm  (#38) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5241
Location: Gimpville
@saulgoode - Thanks for the info. That will give me a place to start.

@ofnuts -I might be misunderstanding, but I believe what Rod is wanting is an enhanced SF-STRING, where you can add line breaks and still only take up a single line on the screen. Either that, or a modified SF-TEXT, where instead of a 3 line scrolling dialog, you have a single line scrolling dialog.

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


Top
 Post subject: Re: Script-Fu User Entry Screen Scroll-bars?
PostPosted: Thu Dec 26, 2013 6:53 pm  (#39) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4812
That would be a smaller SF_TEXT, plugins don't expect line breaks in SF_STRING.

_________________
Image


Top
 Post subject: Re: Script-Fu User Entry Screen Scroll-bars?
PostPosted: Thu Dec 26, 2013 7:43 pm  (#40) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
ofnuts wrote:
If anyone is tweaking this code: the one thing these dialog miss IMHO is some way to set value defaults (and ranges, for sliders/spinners) that are adequate for the image...

That would not be an easy change. The expressions defining the widgets' values are evaluated when the script is loaded, i.e., either at startup or when a Script-fu Refresh is performed, so the image may not be known, let alone its dimensions.

It might be possible to store the expression itself as the argument, and then evaluate the argument when the dialog is constructed (i.e., when the script is executed), but then one needs to develop a means of specifying what the parameter is evaluating. A kludge would be to insert some pseudo-variables such as $image, $width, etc; but I generally dislike such approaches and would lean towards providing bindings only for the standard function arguments and letting the script author be responsible for retrieving the corresponding arguments (e.g., (car (gimp-image-get-width sf-image)) or somesuch). The code might be more complicated but it would not place any artificial limits on what parameters are available (one could, for example, derive the argument from the length of a path or the number of blue pixels in the selection).

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
Post new topic Reply to topic  [ 70 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group