anchor.diff: -;; (create-playlist 'p1)
  -;; (create-playlist 'p2)
  -;; (create-layout 'l1 t)
  -;; (layout-add-component 'l1 'p1 -0.1 -0.9 -0.5)
  -;; (layout-add-splitter 'l1)
  -;; (layout-add-component 'l1 'p2 -0.1 -0.9 -0.5)
  -;; (create-layout 'l2 nil)
  -;; (create-interpreter 'int1)
  -;; (layout-add-component 'l2 'int1 50.0 100.0 50.0)
  -;; (layout-add-splitter 'l2)
  -;; (layout-add-component 'l2 'l1 -0.1 -1.0 -0.9)
  -;;
  -;; (set-main-component 'l2)
  -;;
  -;; (create-tabs 'tab 'bottom)
  -;; (create-playlist 'plpl)
  -;;
  -;; (defun on-playlist-click (item-str)
  -;;   (playback-set-file item-str)
  -;;   (slider-range 'slider 0.0 (playback-length))
  -;;   (playback-start) )
  -;;
  -;; (defun on-slider-up (time)
  -;;   (playback-seek time))
  -;;
  -;; (defun on-update-slider ()
  -;;   (slider-value 'slider (playback-get-pos)))
  -;;
  -;; (create-timer 'update-slider 'on-update-slider)
  -;; (start-timer 'update-slider 500) ;; start-stop?
  -;;
  -;; (bind-mouse-double-click 'plpl 'on-playlist-click '(selected-row))
  -;;
  -;; (layout-add-component 'l2 'tab 300.0 300.0 300.0)
  -;; (defvar cl-red |1.0 0.0 0.0 1.0|)
  -;; (tabs-add-component 'tab 'plpl "First tab" cl-red)
  -;; (create-audio-settings 'sss)
  -;; (tabs-add-component 'tab 'sss "Audio Settings" |0.0 0.8 0.0 0.5|)
  -;; (defun on-play-clicked ()
  -;;   (layout-remove-splitter 'l1 0)
  -;;   (refresh-interface))
  -;;
  -;; ;; (defun playback-changed ()
  -;; ;;   (if (not (playback-is-playing))
  -;; ;;       (on-play-clicked)))
  -;; ;; (bind-playback 'playback-changed)
  -;;
  -;; (tabs-add-component 'tab (create-text-button 'playb "Play" "Plays selected track") "Playback API" |0.0 0.1 0.5 0.9|)
  -;; (tabs-add-component 'tab (create-slider 'slider) "Slider" |0.0 0.5 0.5 0.9|)
  -;; (bind-mouse-click 'playb 'on-play-clicked)
  -;; (bind-slider-drag-end 'slider 'on-slider-up '(slider-value))
  -;;
  -;; (refresh-interface)
  -
   (defvar current-id "")
   (defvar current-index 0)
   (defvar current-playlist nil)
  
positive.code: (setq current-id (or (settings-get "current-index") 0))
  (setq current-playlist (or (settings-get "current-playlist") nil))
  (dolist e (or (settings-get "playlist-tabs") '())
  	(message-box "playlist element: " (strs (nth 0 e) " / " (nth 1 e)))
  	(tabs-add-component 'playlist-tabs
  			    (init-playlist (nth 0 e))
  			    (nth 1 e) |0.5 0.5 0.5 0.9|)
  
negative.code:   (settings-set "current-playlist" current-playlist)
    (ctags-save "playback-stats")
    (settings-save "settings")
    ;;(message-box "Exiting" "just exiting")
    )
  (bind-exit 'on-exit)
  
  ;; bind hotkeys
  