! Copyright (C) 2006, 2007 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: continuations kernel models namespaces prettyprint ui ui.commands ui.gadgets ui.gadgets.controls ui.gadgets.labelled ui.gadgets.tracks ui.gestures ; IN: ui.tools.traceback : ( model -- ) [ [ continuation-call callstack. ] when* ] "Call stack" ; : ( model -- ) [ [ continuation-data stack. ] when* ] "Data stack" ; : ( model -- ) [ [ continuation-retain stack. ] when* ] "Retain stack" ; TUPLE: traceback-gadget ; M: traceback-gadget pref-dim* drop { 300 400 } ; : ( model -- gadget ) { 0 1 } traceback-gadget construct-control [ [ [ g control-model 1/2 track, g control-model 1/2 track, ] { 1 0 } make-track 1/3 track, g control-model 2/3 track, ] with-gadget ] keep ; : traceback-window ( continuation -- ) "Traceback" open-window ;