;;;; Splash.stk -- Jon Berry

;;;; derived from:
;;;;
;;;; console.stk                        -- A simple console written in STk
;;;;
;;;; Copyright © 1998-1999 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
;;;;
;;;; Permission to use, copy, and/or distribute this software and its
;;;; documentation for any purpose and without fee is hereby granted, provided
;;;; that both the above copyright notice and this permission notice appear in
;;;; all copies and derived works.  Fees for distribution or use of this
;;;; software or derived works may only be charged with express written
;;;; permission of the copyright holder.
;;;; This software is provided ``as is'' without express or implied warranty.
;;;;
;;;; $Id: splash.stklos,v 1.1.1.1 2000/05/23 07:17:13 berryj Exp $
;;;;
;;;;           Author: Erick Gallesio [eg@unice.fr]
;;;;    Creation date: 29-Oct-1998 18:51
;;;; Last file update:  1-Feb-1999 14:18

(define *cluster-message*
  (string-append "Cluster Master" " 1.0"
                 "Copyright © 1999\nNate Dean - Rice University\n"
                 "<nated@caam.rice.edu>"))


(define (application-splash-screen msg)
  (let* ((width  400)
         (height 300)
         (top    (toplevel '.__appl_splash__ :bg "white" :relief "solid" :bd 3
                           :width width :height height))
         (m      (label (& top ".m") :justify "center" :fg "IndianRed4"
                        :bg "white" :text msg))
         (img    (make-image "nate.gif"))
         (lab    (label (& top ".l") :image img :bd 0))
         (w      (winfo 'screenwidth top))
         (h      (winfo 'screenheight top))
         (kill   (lambda ()
                   (catch (delete-image "nate.gif"))
                   (destroy top))))
    (wm 'over top #t)
    (wm 'geometry top (format #f "+~A+~A" (/ (- w 400) 2) (/ (- h 300) 2)))
    (pack 'propagate top #f)
    (pack lab m)
    (bind top "<1>" kill)       ;; for the impatients
    (raise top)
    (after 5000 kill)))

(define (init-cluster-master)
	(application-splash-screen *cluster-message*)
	(set! *link:default-graph-view-title* "Cluster Master"))
