original commit: d6be7e535cd675167c18f7bb8a5e7f2a2f239218
This commit is contained in:
Robby Findler 2005-03-13 02:33:19 +00:00
parent 55e4f4c7aa
commit 4cdc36eaae

View File

@ -147,21 +147,19 @@
(λ ()
(split (get-horizontal%)))]
(public collapse)
(define collapse
(λ ()
(let ([canvas (send (send parent get-top-level-window) get-edit-target-window)]
[ec% (get-editor-canvas%)])
(when (and canvas
(is-a? canvas ec%)
(eq? (send canvas get-editor) editor))
(let ([p (send canvas get-parent)])
(if (eq? p this)
(bell)
(let* ([sp (send p get-parent)]
[p-to-remain (send sp get-parent)])
(send p-to-remain change-children (λ (x) null))
(send (make-object ec% p-to-remain editor) focus))))))))
(define/public (collapse)
(let ([canvas (send (send parent get-top-level-window) get-edit-target-window)]
[ec% (get-editor-canvas%)])
(when (and canvas
(is-a? canvas ec%)
(eq? (send canvas get-editor) editor))
(let ([p (send canvas get-parent)])
(if (eq? p this)
(bell)
(let* ([sp (send p get-parent)]
[p-to-remain (send sp get-parent)])
(send p-to-remain change-children (λ (x) null))
(send (make-object ec% p-to-remain editor) focus)))))))
(super-instantiate () (parent parent))