Plaster

common-lisp
(define-example simple-window (screen) (let* ((window (windowing:make-window screen)) (focus (make-instance 'alloy:focus-list :focus-parent window)) (layout (make-instance 'alloy:vertical-linear-layout :layout-parent window)) (name "") (name (alloy:represent name 'alloy:input-line :focus-parent focus :layout-parent layout)) (button (alloy:represent "Greet" 'alloy:button))) (alloy:enter button layout) (alloy:enter button focus) (let ((data (alloy:data name)) (window NIL)) (alloy:on alloy:activate (button) (unless window (setf window (windowing:make-window screen :background-color colors:white)) (alloy:enter (alloy:represent (lambda ((value (alloy:value data))) (format NIL "Hello, ~a" value)) 'alloy:label) window))))))