#!/bin/sh :;exec /usr/local/bin/stk -f "$0" "$@" ;;;; ;;;; h b r o w s e -- A HTML browser ;;;; ;;;; Copyright © 1993-1996 Erick Gallesio - I3S-CNRS/ESSI ;;;; ;;;; 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. ;;;; ;;;; Author: Erick Gallesio [eg@unice.fr] ;;;; Creation date: 31-Aug-1995 15:15 ;;;; Last file update: 17-Sep-1996 11:49 ;;;; (require "Tk-classes") (require "Basics") (require "html") (expand-heap 100000) ; but far lower than netscape ;-) ;;; ;;; class definition ;;; ;;; I don't use the class to avoid its (long) loading. ;;; Only a little bit of canvas capabilities are used here (define-class ( ) ((foreground :accessor foreground :initform "red" :init-keyword :foreground))) (define-method tk-constructor ((self )) Tk:canvas) (define-method initialize ((self ) initargs) (next-method) (slot-set! self 'highlight-thickness 0) ((slot-ref self 'Id) 'create 'line 0 0 0 0 :fill (foreground self) :width (* 2 (+ (height self) 2)))) (define (update-gauge g percent) ((slot-ref g 'Id) 'coords "1" 0 0 (quotient (* (width g) percent) 100) 0) (update)) ;;; ;;; Make interface ;;; (let ((loc (make :title "Location:" :text-variable '*location* :font "fixed")) (txt (make :font "fixed" :width 80 :height 45))) (bind (Id loc) "" (lambda () (Html:view-url (Id txt) (value loc)))) (pack loc :expand #f :fill "x" :padx 30 :pady 4) (pack txt :expand #t :fill "both") (let* ((f (make )) (lab (make