2005-06-01 06:04:21 -04:00
|
|
|
(define-record-type focus-table :focus-table
|
|
|
|
(really-make-focus-table table count)
|
|
|
|
focus-table?
|
|
|
|
(table focus-table-table)
|
|
|
|
(count focus-table-count set-focus-table-count!))
|
|
|
|
|
|
|
|
(define (make-empty-focus-table)
|
|
|
|
(really-make-focus-table (make-integer-table) 0))
|
|
|
|
|
|
|
|
(define (add-focus-object focus-table object)
|
|
|
|
(let ((count (+ 1 (focus-table-count focus-table))))
|
2005-06-01 07:26:22 -04:00
|
|
|
(set-focus-table-count! focus-table count)
|
2005-06-01 06:04:21 -04:00
|
|
|
(table-set!
|
|
|
|
(focus-table-table focus-table) count object)
|
|
|
|
count))
|
|
|
|
|
|
|
|
(define (get-focus-object focus-table index)
|
|
|
|
(table-ref (focus-table-table focus-table) index))
|
|
|
|
|