;;;; ;;;; and classes ;;;; ;;;; Copyright © 1993-1999 Erick Gallesio - I3S-CNRS/ESSI ;;;; ;;;; Permission to use, copy, modify, distribute,and license this ;;;; software and its documentation for any purpose is hereby granted, ;;;; provided that existing copyright notices are retained in all ;;;; copies and that this notice is included verbatim in any ;;;; distributions. No written agreement, license, or royalty fee is ;;;; required for any of the authorized uses. ;;;; This software is provided ``AS IS'' without express or implied ;;;; warranty. ;;;; ;;;; ;;;; Idea of multiples windows comes from a Tcl package called mdw_lib.tk ;;;; (a classlib for [m]ulti-[d]ocument-[w]indow applications). ;;;; The mdw-lib is a number of Tcl/Tk procedures to create and manipulate ;;;; multiple childwindows in one Tk application window ;;;; The mdw_lib author is Thomas Schwarze ;;;; Original package is GPL'ed. However, code and way to implement ;;;; multiple windows and mdw_lib are completely different. ;;;; ;;;; ;;;; Author: Erick Gallesio [eg@unice.fr] ;;;; Creation date: 5-Apr-1996 18:04 ;;;; Last file update: 3-Sep-1999 21:34 (eg) (require "Basics") (select-module STklos+Tk) (export place) ;; Since it it redefined as a generic ... (image 'create 'bitmap '*bitmap-cross* :data "#define cross_width 10 #define cross_height 10 static unsigned char cross_bits[] = { 0,0,0,0,0xc,3,0x9c,3,0xf8,1,0xf0,0,0xf0,0,0xf8,1,0x9c,3,0x0c,3};") (image 'create 'bitmap '*bitmap-icon* :data "#define icon_width 10 #define icon_height 10 static unsigned char icon_bits[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xfc,3,0xfc,3,0,0};") (image 'create 'bitmap '*bitmap-max* :data "#define max_width 10 #define max_height 10 static unsigned char max_bits[] = { 0,0,0,0,0xfc,3,0xfc,3,0xfc,3,0xfc,3,0xfc,3,0xfc,3,0xfc,3,0xfc,3};") (image 'create 'bitmap '*bitmap-min* :data "#define min_width 10 #define min_height 10 static unsigned char min_bits[] = { 0,0,0,0,0,0,0,0,0xf0,0,0xf0,0,0xf0,0,0xf0,0,0,0,0,0};") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; ;;;; class ;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (define-class () (bottom-bar bottom-bar-title (class :init-keyword :class :init-form "MultipleWindow") (current :initform #f) (children :initform '()) (child-selected-col :initform '("white" . "RoyalBlue1")) (child-unselected-col :initform '("gray80" . "gray50")))) (define-method initialize ((self ) initargs) (next-method) (if (zero? (width self)) (set! (width self) 640)) (if (zero? (height self)) (set! (height self) 480)) (pack 'propagate self #f) ;; Ignore the border-width or highlight-thickness given (or implied ;; by a .Xdefaults configuration) to ease window movement in. This ;; is clearly not correct but user should not see the trick (slot-set! self 'border-width 0) (slot-set! self 'highlight-thickness 0) ;; Create the bottom bar (let* ((bb (make :parent self :border-width 3 :relief "groove")) (l (make