! Copyright (C) 2006, 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors colors inspector namespaces kernel models fry
-colors.constants models.arrow prettyprint sequences mirrors assocs
-classes io io.styles arrays hashtables math.order sorting refs fonts
-ui.tools.browser ui.commands ui.operations ui.gadgets ui.gadgets.panes
-ui.gadgets.scrollers ui.gadgets.slots ui.gadgets.tracks ui.gestures
-ui.gadgets.buttons ui.gadgets.lines ui.gadgets.tables
-ui.gadgets.toolbar ui.gadgets.status-bar
-ui.gadgets.labeled ui.tools.common ui combinators ui.gadgets.worlds ;
+colors.constants models.arrow prettyprint sequences mirrors
+assocs classes io io.styles arrays hashtables math.order sorting
+refs fonts ui.tools.browser ui.commands ui.operations ui.gadgets
+ui.gadgets.panes ui.gadgets.scrollers ui.gadgets.slots
+ui.gadgets.theme ui.gadgets.tracks ui.gestures
+ui.gadgets.buttons ui.gadgets.tables ui.theme ui.gadgets.toolbar
+ui.gadgets.status-bar ui.gadgets.labeled ui.tools.common ui
+combinators ui.gadgets.worlds ;
IN: ui.tools.inspector
TUPLE: inspector-gadget < tool table ;
: <inspector-table> ( model -- table )
[ make-slot-descriptions ] <arrow> inspector-renderer <table>
[ invoke-primary-operation ] >>action
- monospace-font >>font
- COLOR: dark-gray >>column-line-color
+ monospace-font >>font theme-font-colors
+ line-color >>column-line-color
6 >>gap
15 >>min-rows
15 >>max-rows
40 >>min-cols
40 >>max-cols ;
-<PRIVATE
-
-CONSTANT: object-color COLOR: aquamarine2
-CONSTANT: contents-color COLOR: orchid2
-
-PRIVATE>
-
: <inspector-gadget> ( model -- gadget )
vertical inspector-gadget new-track with-lines
add-toolbar
swap >>model
dup model>> <inspector-table> >>table
- dup model>> <summary-gadget> margins white-interior "Object" object-color <labeled-gadget> f track-add
- dup table>> <scroller> white-interior "Contents" contents-color <labeled-gadget> 1 track-add ;
+ dup model>> <summary-gadget> margins white-interior "Object" object-color <labeled> f track-add
+ dup table>> <scroller> margins white-interior "Contents" contents-color <labeled> 1 track-add ;
M: inspector-gadget focusable-child*
table>> ;