! Copyright (C) 2006 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. IN: gadgets-workspace USING: arrays gadgets gadgets-listener gadgets-buttons gadgets-walker gadgets-help gadgets-walker sequences gadgets-books gadgets-frames kernel models namespaces ; TUPLE: workspace model ; : workspace-tabs { { "Listener" listener-gadget [ ] } { "Walker" walker-gadget [ ] } { "Dictionary" browser [ ] } { "Documentation" help-gadget [ ] } } ; : ( workspace -- book ) workspace-model workspace-tabs [ third ] map ; : ( workspace -- tabs ) workspace-model workspace-tabs dup length [ swap first 2array ] 2map ; C: workspace 0 over set-workspace-model { { [ gadget get ] f f @top } { [ gadget get ] f f @center } } make-frame* ;