next up previous contents
Next: File ``gui_helper.scm'' Up: Appendix B: Listing Previous: File ``errormsg.scm''   Contents

File ``aboutbox.scm''

;;--------------------------------------------------------------------------
;; AriNET Project in Informatics IA by Dominique Guinard
;; dominique.guinard@unifr.ch
;;--------------------------------------------------------------------------
;; about box
;;--------------------------------------------------------------------------

; ------------------------------------------------------------
; ABSTRACT:
; *********
; This file contains the code for building the 
; "About AriNET..." box.
; ------------------------------------------------------------


; creating the about-box
(define (about-box)
  (define theDialog (instantiate frame% ("About AriNET..." 
                                         #f 
                                         200 
                                         150
                                         (get-center-position 'x 200 150)
                                         (get-center-position 'y 200 150)
                                         '(no-resize-border))))
  
  ;(define theLogo (instantiate bitmap% ("arinetlogogif.gif")))
  (define theLogo (instantiate bitmap% ((build-path "images" "arinetlogogif.gif"))))
  
  (define (paint-proc theCanvas theDc)
    (send theDc draw-bitmap theLogo 0 0))
  
  (define theSuperCanvas%
    (class canvas% ()
    ; on-event : procedure called on every single click or action from keyboard
    (override on-event)
    (define (on-event ev)
      (if (send ev get-left-down) (send (send this get-parent) on-exit)))
    (super-instantiate())))
  
  (define theCanvas (instantiate theSuperCanvas% (theDialog '(border) paint-proc)
                      (min-width (send theLogo get-width))
                      (min-height (send theLogo get-height))))
  
  (send theDialog show #t))
; ------------------------------------------------------------
; end of about box
; ------------------------------------------------------------



dominique 2003-06-02