Module: environment-debugger Author: Bill Chiles, Jason Trenouth Synopsis: Generally useful stuff and temporary hacks Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. All rights reserved. License: Functional Objects Library Public License Version 1.0 Dual-license: GNU Lesser General Public License Warranty: Distributed WITHOUT WARRANTY OF ANY KIND /// WITHIN-FRAME (internal) /// /// Macro to insert work into frame's event loop define macro within-frame { within-frame (?name:variable = ?frame:expression) ?body:body end } => { local method _do-the-body_ (?name) ?body; end method; let _frame_ = ?frame; call-in-frame(_frame_, _do-the-body_, _frame_); } { within-frame (?name:name) ?body:body end } => { local method _do-the-body_ (?name) ?body; end method; let _frame_ = ?name; call-in-frame(_frame_, _do-the-body_, _frame_); } end macro; /// CHOOSE-INTO (internal) /* define method choose-into (into :: , test :: , outof :: ) => (into :: ) // ---*** LANGUAGE: remove-all-keys! should work on stretchy-vectors into.size := 0; local method maybe-add!(x) test(x) & add!(into, x) end method; do(maybe-add!, outof); into; end method; */ /// NON-EMPTY-STRING (internal) define function non-empty-string (string :: ) => (result :: false-or()) ~empty?(string) & string end function non-empty-string; /// $VERTICAL-SPACING define constant $vertical-spacing :: = 8; /// REDISPLAY-DEBUGGER-EDITOR-WINDOW (internal) define function redisplay-debugger-editor-window (window :: , #key refresh? :: = #f) => () if (sheet-mapped?(window)) with-editor-state-bound (window) if (refresh?) queue-redisplay(window, $display-all) else queue-redisplay(window, $display-text, centering: 1) end; redisplay-window(window) end end end function redisplay-debugger-editor-window;