anchor.diff:  ;; License along with this library; if not, write to the Free Software
   ;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   
  -;; $Id: testgtk.lisp,v 1.27 2005-04-18 10:39:32 espen Exp $
  +;; $Id: testgtk.lisp,v 1.28 2005-04-19 08:17:06 espen Exp $
   
   (defpackage "TESTGTK"
     (:use "COMMON-LISP" "GTK"))
  
positive.code:     (:toolbar "ToolBar"
       (:toolitem "Open")
       (:toolitem "Quit")
       (:separator "Sep1")
       (:toolitem "Logo"))))
  
  (define-toplevel create-ui-manager (window "UI Manager")
    (let ((actions 
  	 (make-instance 'action-group 
  	  :name "Actions"
  	  :action (create-action "FileMenu" nil "_File")
  	  :action (create-action "PreferencesMenu" nil "_Preferences")
  	  :action (create-action "ColorMenu" nil "_Color")
  	  :action (create-action "ShapeMenu" nil "_Shape")
  	  :action (create-action "HelpMenu" nil "_Help")
  	  :action (create-action "New" "gtk-new" "_New" "<control>N" "Create a new file")
  	  :action (create-action "Open" "gtk-open" "_Open" "<control>O" "Open a file" #'create-file-chooser)
  	  :action (create-action "Save" "gtk-save" "_Save" "<control>S" "Save current file")
  	  :action (create-action "SaveAs" "gtk-save" "Save _As..." "" "Save to a file")
  	  :action (create-action "Quit" "gtk-quit" "_Quit" "<control>Q" "Quit" (list #'widget-destroy :object window))
  	  :action (create-action "About" nil "_About" "<control>A" "About")
  	  :action (create-action "Logo" "demo-gtk-logo" "" nil "GTK+")
  	  :action (create-toggle-action "Bold" "gtk-bold" "_Bold" "<control>B" "Bold" t)
  	  :actions (create-radio-actions
  		    '(("Red" nil "_Red" "<control>R" "Blood")
  		      ("Green" nil "_Green" "<control>G" "Grass")
  		      ("Blue" nil "_Blue" "<control>B" "Sky"))
  		    "Green")
  	  :actions (create-radio-actions
  		    '(("Square" nil "_Square" "<control>S" "Square")
  		      ("Rectangle" nil "_Rectangle" "<control>R" "Rectangle")
  		      ("Oval" nil "_Oval" "<control>O" "Egg")))))
  	(ui (make-instance 'ui-manager)))
    
      (ui-manager-insert-action-group ui actions)
      (ui-manager-add-ui ui *ui-description*)
  
      (window-add-accel-group window (ui-manager-accel-group ui))
      
      (make-instance 'v-box 
       :parent window
       :child (list 
  
negative.code: 
        (let* ((actions 
  	      (make-instance 'action-group 
  	       :action (make-instance 'toggle-action 
  			:name "Bold" :stock-id "gtk-bold" :label "Bold" 
  			:accelerator "<control>B" :tooltip "Bold"
  			:callback (create-toggle-callback "Bold"))
  	       :action (make-instance 'toggle-action 
  			:name "Italic" :stock-id "gtk-italic" :label "Italic" 
  			:accelerator "<control>I" :tooltip "Italic"
  			:callback (create-toggle-callback "Italic"))
  	       :action (make-instance 'toggle-action 
  			:name "Underline" :stock-id "gtk-underline" 
  			:label "Underline" :accelerator "<control>U" 
  			:tooltip "Underline"
  			:callback (create-toggle-callback "Underline"))))
  	     (ui (make-instance 'ui-manager
  		  :action-group actions
  		  :ui '((:toolbar "ToolBar"
  		         (:toolitem "Bold")
  			 (:toolitem "Italic")
  			 (:toolitem "Underline"))))))
  
  	;; Callback to activate/deactivate toolbar buttons when cursor
  	;; is moved
  