* documentation corrections regarding default layout of frame and dialog
* switchable look and feel with (gs:set-look-and-feel <str>).
* now on Windows the Windows look and feel is chosen correctly by default
* speedup of interpreter
Files: http://newlisp.org/downloads/development/
see also updated
http://newlisp.org/downloads/development/GuiserverDemo-Win32.png
Lutz
ps: in widgets-demo.lsp are outcommented lines to play with different look-and-feel flavors, Motif and Metal should work on all platforms
Here's my Linux screendump of Guiserver-02
//http://www.nodep.nl/downloads/newlisp/lingui02.png
remark on Guiserver-02
* using 9gs:set-look-and-feel returns, but it keeps running ->
server accepted from 0.0.0.0
server connecting to 0.0.0.0:47012
retrying to connect
server connected
Error: java.lang.NullPointerException
OS/2 does not work, OS/2 has java .1.4.2_b05 which is not a a full 1.4.2 (pitty)
* Can linux get a Mac or Windows look and feel? or is that realy hardcoded?
* remark on (gs:set-background) it does not work on a (gs:label) ??
and it seems that set-background must be after set-foreground or around...
* remark on the manual,
Look very clean! nice !..but the index is better top-down instead of left-right
(the set-.... could be sorted too..saves searching ;-)
PS: can newlisp GUI beat this :-) ..this java tool is realy smashing..pfff..-> //http://trolltech.com/products/qt/downloads
It was just released by QT... but the commercial version starts at $1700 upto $pingping (The link is the GLP version...)
(I dont want to start nagging already ;-)
* Question:
Can the gui get a default screen-refresh ? The gui will always be in a wait state
when blocking event in newlisp happen and update needs in the GUI
* another Question
Will global Mouse-events be implemented in de 2d-draw addon ?
(for drag and drop or drawing..)
Regards,
Norman.
Forget my post on the 0.1 thread.
Now I get really native GUI on WIN classic GUI and on WIN XP GUI.
That was what I asking for. Real native look and feel.
Fantastic!
Quote
http://www.nodep.nl/downloads/newlisp/lingui02.png
whats the right most flavor is that the GTKLookAndFeel flavor, or just the default which comes up on Linux. What Java RE are you running on what Linux?
Quote
gs:set-look-and-feel returns, but it keeps running ->
Error: java.lang.NullPointerException
yes, I see that message too when doing the Motif flavor on the Mac, it works but gives the message ... will research
Quote
Can linux get a Mac or Windows look and feel? or is that realy hardcoded?
It looks like systems only support their own + Metal + Motif
Quote
remark on (gs:set-background) it does not work on a (gs:label) ??
and it seems that set-background must be after set-foreground or around...
Will investigate this. Can you show the whole code? or isolate the problem into a simple app (like fantastico.lsp)
Quote
remark on the manual,
Look very clean! nice !..but the index is better top-down instead of left-right
(the set-.... could be sorted too..saves searching ;-)
I have been thinking of putting the whole thing in frames like the main newLISP manual. The you could have the whole Manual index to the left.
Quote
PS: can newlisp GUI beat this -> http://trolltech.com/products/qt/downloads
It was just released by QT... but the commercial version starts at $1700 upto $pingping (The link is the GLP version...)
Yes, newLISP beats this by $1700, :-)
Quote
The gui will always be in a wait state
when blocking event in newlisp happen and update needs in the GUI
Thats not true, if you put a long sleep lets say into witgets-demo.lsp here:
(define (button-handler)
(sleep 30000)
(gs:dialog 'TheDialog 'WidgetsDemo "A Dialog Window" 300 200 true true))
You can still resize, cover etc. the main app gets repainted nicely, before after 30 seconds finally the dialog pops up. (on ther Mac)
Quote
Will global Mouse-events be implemented in de 2d-draw addon ?
(for drag and drop or drawing..)
Yes, mouse events for movements and all mouse-buttons will be in the first implementation, including the mouse-wheel.
To HPW:
I wonder how far it will honor user settings, i.e. putting different XP-themes, will they be reflected in the Java app too?
Lutz
Quote from: "Lutz"
Quote
http://www.nodep.nl/downloads/newlisp/lingui02.png
The most right is the GTK..the middle the goold old Motif and Left is JAVA..
Im getting the Java Error on all 3 Look-and-feel btw...
Quote
remark on (gs:set-background) it does not work on a (gs:label) ??
and it seems that set-background must be after set-foreground or around...
Look like set-background is not working.. even if I place
it after the gs:label... See below..
#!/usr/bin/newlisp
(if (= ostype "Win32")
(load (string (env "PROGRAMFILES") "/newlisp/guiserver.lsp"))
(load "/usr/share/newlisp/guiserver.lsp")
)
(gs:init)
(gs:frame 'Fan 100 100 800 400 "newlispy")
;;(gs:set-background 'Fan 1 1 0 0.5)
(gs:panel 'One 800 200)
(gs:set-color 'One 1 1 1 0.5)
(gs:set-background 'One 0.8 0.2 0.1 0)
(gs:label 'One "FANTASTICO!" )
;;(gs:set-background 'One 0.8 0.2 0.1 0)
(gs:set-font 'One "Sans Serif" 64 "bold")
(gs:add-to 'Fan 'One)
(gs:set-visible 'Fan true)
(gs:listen)
Quote
Yes, newLISP beats this by $1700, :-)
thats good news ;-) heheheh...
Quote
The gui will always be in a wait state
when blocking event in newlisp happen and update needs in the GUI
Thats not true, if you put a long sleep lets say into witgets-demo.lsp here:
ill try it...
Quote
Will global Mouse-events be implemented in de 2d-draw addon ?
(for drag and drop or drawing..)
Yes, mouse events for movements and all mouse-buttons will be in the first implementation, including the mouse-wheel.
Thanks for the feedback ;-)
Norman.
The GTK flavor looks nice, I believe you get only on Linux or systems with GTK installed (I read somewhere)
Some comments to your fantastico program:
- you should not use the same symbol 'One for a panel and a label. A id symbol should be used for only one widget. It still works for you for unknown reasons (I guess it sets it, then resets it).
- investigating the label color issue, it turns out that labels are transparent and show the color of their container.
- dont't put the alpha-channel variable (the 4th in the color spec) to 0, it means the the color is 100% transparent and shows nothing. Rather put it to 1.0 or 1 for 100% opaque or any thing in between 0 and 1 for varying degree of transparency, or leave it out for total opaqueness.
Here is the improved code of your program putting a colored 'aPanel into the main 'Fan frame and putting the label 'One into the colored containe 'aPanel:
(gs:frame 'Fan 100 100 800 100 "newlispy")
(gs:panel 'aPanel 800 200)
(gs:set-background 'aPanel 0.8 0.2 0.1 1)
(gs:label 'One "FANTASTICO!" )
(gs:set-font 'One "Sans Serif" 64 "bold")
(gs:add-to 'aPanel 'One)
(gs:add-to 'Fan 'aPanel)
(gs:set-visible 'Fan true)
Lutz
ahaa oke..
Hi Lutz,
actualy another question...
How do i update an image-label with a new image...
Im unable to get the image refreshed...
Btw..it would be nice if the icon-path would also be a i.e. (read-file ....) action...
instead of reading from disk it reads from text directly..
Norman.
Quote
I wonder how far it will honor user settings, i.e. putting different XP-themes, will they be reflected in the Java app too?
Yes, works perfectly.
When set to Classic it uses native classic look.
and when set to Luna it uses the luna themes, whatever it is set on the PC.
Without any change on the newLISP side!
Thats real multiplatform!
And a real powerfull abstract conzept for GUI definition.
I just started playing with the demos...very nice. As a linux guy, I'm compelled to ask if you've tried to compile guiserver.jar with gcj?
No, I have not. Now that Sun is in the process of GPLing their Java (I think it already finsihed the process) there isn't really any need for this. But it would be interesting to hear what will happen. If gcj is 100 Java platform conformant it shoudn't be a problem. I know that IBMs jikes Java compiler plays well with Sun stuff.
Lutz