newLISP Fan Club

Forum => newLISP Graphics & Sound => Topic started by: HPW on June 16, 2007, 10:52:17 AM

Title: Combined demo
Post by: HPW on June 16, 2007, 10:52:17 AM
I put some of the current demos together:



(load "//http://hpwsoft.de/anmeldung/html1/newLISP/gui-demo.lsp")



Also Combo and listbox echos right text in textearea:

(define (action-handler)
(if (= "MAIN:TheToggleButton" (args 0))
(if (true? (args 1))
(gs:disable 'TheButton 'TheImageButton 'TheRadioButton 'TheCheckBox 'TheMessage)
(gs:enable 'TheButton 'TheImageButton 'TheRadioButton 'TheCheckBox 'TheMessage)
))

(if (= "MAIN:TheImageButton" (args 0))
(gs:color-dialog 'TheFrame 'action-handler "Choose a color" 1 1 1))

(if (= "MAIN:TheMessage" (args 0))
(gs:confirm-dialog 'TheFrame 'action-handler
"A Message" "Enjoy GUI server"
"yes-no"
;(amb "error" "informaton" "warning" "question" "plain")
))

(let (s "")
(doargs (item)
(write-buffer s (string item " ")))

(if (or
(= "MAIN:TheComboBox" (args 0))
(= "MAIN:TheListBox" (args 0)))
(write-buffer s (string (base64-dec (args 2)) " "))
)

(write-buffer s "n")
(gs:append-text 'MonitorArea s)
)
)
Title:
Post by: didi on June 16, 2007, 11:11:19 PM
It's very nice to see all possibilities of the gui-server at once .



When i read through the manual of the gui-server it was sometimes difficult to imagine what was meant - this demo is a good idea !