anchor.diff:  ;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Package: CLIM-DEMO; Base: 10; Lowercase: Yes -*-
   
  -;;;  (c) copyright 2001 by 
  +;;;  (c) copyright 2001 by
   ;;;           Julien Boninfante (boninfan@emi.u-bordeaux.fr)
   
   ;;; This library is free software; you can redistribute it and/or
  
positive.code: 
  (defun callback-orange (gadget value)
    (declare (ignore gadget))
    (when value 
      (setf (clim-internals::gadget-current-color (slot-value *application-frame* 'light))
  	  (clim-internals::gadget-highlighted-color (slot-value *application-frame* 'light)))))
  
  
negative.code: 
  (defmethod handle-event :after ((pane clim-internals::light-pane) (event pointer-event))
    (declare (ignorable event))
    (let ((label (gadget-label (radio-box-current-selection
                                (slot-value *application-frame* 'radio-box)))))
      (cond ((string= label "O")
             (traffic-pause 3)
             (simulate-user-action (find-pane-named *application-frame*
                                                    'red)))
  	  ((string= label "G")
             (traffic-pause 5)
             (simulate-user-action (find-pane-named *application-frame*
                                                    'orange)))
  	  (t nil))))
  
  (defun traffic-pause (time)
    (let ((time-left-window (find-pane-named *application-frame* 'time-left)))
      (flet ((show-time (left)
               (setf (gadget-value time-left-window)
                     (format nil "~D" left))))
        (loop for left from time downto 1
           do (show-time left)
              (sleep 1))
        (show-time 0))))
  
  (defmethod simulate-user-action ((pane toggle-button))
    (setf (gadget-value pane :invoke-callback t) (not (gadget-value pane))))
  
  (defun callback-red (gadget value)
    (declare (ignorable gadget))
  