development GUI-server v. 0.92
development GUI-server v. 0.92
* new functions for getting system properties for version, screen and installed fonts
* two new demos: allfonts-demo.lsp and properties-demo.lsp
* increased size for data transfer between serrver and application
* gs:no-event void action-handlers in widgtets
Files: http://newlisp.org/downloads/development/
Changes notes: http://newlisp.org/downloads/developmen ... er-092.txt
Docs: http://newlisp.org/downloads/developmen ... rver-0.92/
Lutz
* two new demos: allfonts-demo.lsp and properties-demo.lsp
* increased size for data transfer between serrver and application
* gs:no-event void action-handlers in widgtets
Files: http://newlisp.org/downloads/development/
Changes notes: http://newlisp.org/downloads/developmen ... er-092.txt
Docs: http://newlisp.org/downloads/developmen ... rver-0.92/
Lutz
Hi Lutz,
The code below works..but when I change gs:frame into gs:window
the label seems to be gone?? or someting else?
(if (= ostype "Win32")
(load (string (env "PROGRAMFILES") "/newlisp/guiserver.lsp"))
(load "/usr/share/newlisp/guiserver.lsp"))
(gs:init)
(gs:get-screen)
(gs:set-look-and-feel "javax.swing.plaf.metal.MetalLookAndFeel")
(gs:frame 'T 0 (div (- (gs:screen 1) 300) 2) (gs:screen 0) 300 " " )
(gs:set-grid-layout 'T 1 0 0 0 )
(gs:panel 'P)
(gs:set-background 'P 0 0 0)
(gs:label 'TAG "NEEEOOON" )
(gs:add-to 'P 'TAG)
(gs:add-to 'T 'P)
(gs:set-visible 'T true)
(while
(sleep 200)
(gs:set-font 'TAG "Monospaced" 218 "bold")
(gs:set-foreground 'TAG '(0.87058824 0.95686275 0.15294118 0.2))
(sleep 100)
(gs:set-font 'TAG "Monospaced" 216 "bold")
(gs:set-foreground 'TAG 0 0.5 0))
(exit)
The code below works..but when I change gs:frame into gs:window
the label seems to be gone?? or someting else?
(if (= ostype "Win32")
(load (string (env "PROGRAMFILES") "/newlisp/guiserver.lsp"))
(load "/usr/share/newlisp/guiserver.lsp"))
(gs:init)
(gs:get-screen)
(gs:set-look-and-feel "javax.swing.plaf.metal.MetalLookAndFeel")
(gs:frame 'T 0 (div (- (gs:screen 1) 300) 2) (gs:screen 0) 300 " " )
(gs:set-grid-layout 'T 1 0 0 0 )
(gs:panel 'P)
(gs:set-background 'P 0 0 0)
(gs:label 'TAG "NEEEOOON" )
(gs:add-to 'P 'TAG)
(gs:add-to 'T 'P)
(gs:set-visible 'T true)
(while
(sleep 200)
(gs:set-font 'TAG "Monospaced" 218 "bold")
(gs:set-foreground 'TAG '(0.87058824 0.95686275 0.15294118 0.2))
(sleep 100)
(gs:set-font 'TAG "Monospaced" 216 "bold")
(gs:set-foreground 'TAG 0 0.5 0))
(exit)
-- (define? (Cornflakes))
The frameless windows in GUI-server is a different animal then all other Widgets in GUI-server, it does not belong to the Java Swing family, but is a lower level widget, and many things behave differently. I haven't figured out all differences yest, you have to experiment.
But if you take out the panel and put the label directly into the windows it works. In either case with gs:windows or with gs:frame, you don't need the panel in-between but can put the label directly. Here is a simplified version which works:
An additional observation: there is now grid-layout with 1 row and 0 columns, you must have at least 1 column.
But the grid-layout is not necessary here. You can just add anything to a frame or window directly, and it will expand to full size, as if in a grid-layout of one cell. I also do this in frameless-demo.lsp and property-demo.lsp. BTW if you make the window transparent on MacOS X it looks like NEEEOOON is floating.
Lutz
But if you take out the panel and put the label directly into the windows it works. In either case with gs:windows or with gs:frame, you don't need the panel in-between but can put the label directly. Here is a simplified version which works:
Code: Select all
(if (= ostype "Win32")
(load (string (env "PROGRAMFILES") "/newlisp/guiserver.lsp"))
(load "/usr/share/newlisp/guiserver.lsp"))
(gs:init)
(gs:get-screen)
(gs:set-look-and-feel "javax.swing.plaf.metal.MetalLookAndFeel")
(gs:window 'T 0 (div (- (gs:screen 1) 300) 2) (gs:screen 0) 300 " " )
(gs:set-background 'T 0 0 0 0) ; put this on MacOS X for floating letters
(gs:label 'TAG "NEEEOOON" )
(gs:add-to 'T 'TAG)
(gs:set-visible 'T true)
(while (sleep 200)
(gs:set-font 'TAG "Monospaced" 218 "bold")
(gs:set-foreground 'TAG '(0.87058824 0.95686275 0.15294118 0.2))
(sleep 100)
(gs:set-font 'TAG "Monospaced" 216 "bold")
(gs:set-foreground 'TAG 0 0.5 0))
(exit)
But the grid-layout is not necessary here. You can just add anything to a frame or window directly, and it will expand to full size, as if in a grid-layout of one cell. I also do this in frameless-demo.lsp and property-demo.lsp. BTW if you make the window transparent on MacOS X it looks like NEEEOOON is floating.
Lutz
Aha right oke ill give it a try...
Btw.. I used the extra gs:panel because it seems that using this panel
I dont have a flicker in the gs:font loop, which is more smooth...
Seems Java is only refreshing the panel in that case and not the whole screen..
There is a way in Linux to make root-windows transparent,
I read once, cant remember for sure but there are some upgrades needed
on X or some changes. Anyway pitty i dont have the transparent look here ;-)
It would be nice if guiserver would have somekind of a tone-generator..to
make some sounds... not sure if that is easy or possible..
Something like: (gs:tone rate duration volume) but then again that would
become an extra thread perhpas..
Oh yes 2 other questions...
What is the use of gs:dispose ?
And I assume gs:canvas is not doing any extra's yet?
Norman.
Btw.. I used the extra gs:panel because it seems that using this panel
I dont have a flicker in the gs:font loop, which is more smooth...
Seems Java is only refreshing the panel in that case and not the whole screen..
There is a way in Linux to make root-windows transparent,
I read once, cant remember for sure but there are some upgrades needed
on X or some changes. Anyway pitty i dont have the transparent look here ;-)
It would be nice if guiserver would have somekind of a tone-generator..to
make some sounds... not sure if that is easy or possible..
Something like: (gs:tone rate duration volume) but then again that would
become an extra thread perhpas..
Oh yes 2 other questions...
What is the use of gs:dispose ?
And I assume gs:canvas is not doing any extra's yet?
Norman.
-- (define? (Cornflakes))
when doing the 2D graphics stuff I will dig a little bit into the Java multimedia API.it would be nice if guiserver would have somekind of a tone-generator..to make some sounds...
for destroying frames, dialogs and windows from a program; haven't tried it out much. For other components use gs:remove-fromWhat is the use of gs:dispose
similar to a gs:panel, but used for drawing graphics and text, and it also can have mouse and keyboard handlers attached to it. This way you can roll your own-whatever-you-want :-).And I assume gs:canvas is not doing any extra's yet?
Lutz
you probably did not update guiserver.jar and guserver.lsp in /usr/share/newlisp or c:\Program Files\newlisp
read here:
http://newlisp.org/downloads/developmen ... readme.txt
also, use all files from the same version (0.92 at the moment)
Lutz
read here:
http://newlisp.org/downloads/developmen ... readme.txt
also, use all files from the same version (0.92 at the moment)
Lutz
9.1.1 runs fine, only versions 9.1.4/5/6 pose a problem, versions 9.1.7/8 are fine too. The error message you are reporting really looks like you are using an outdated version of either guiserver.jar guiserver.lsp or newlisp-edit.lsp. Please check again ;)
Lutz
ps: if that doesn't help tell me which of the 12 demos are running and which not, and are you running Windows XP, or which OS?
Lutz
ps: if that doesn't help tell me which of the 12 demos are running and which not, and are you running Windows XP, or which OS?