: primary-operation ( obj -- operation )
[ command>> +primary+ word-prop ] find-operation ;
+: invoke-primary-operation ( obj -- )
+ dup primary-operation invoke-command ;
+
: secondary-operation ( obj -- operation )
dup
[ command>> +secondary+ word-prop ] find-operation
[ ] [ primary-operation ] ?if ;
+: invoke-secondary-operation ( obj -- )
+ dup secondary-operation invoke-command ;
+
: default-flags ( -- assoc )
H{ { +keyboard+ f } { +primary+ f } { +secondary+ f } } ;
! Copyright (C) 2006, 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors inspector namespaces kernel models fry
-models.filter prettyprint sequences mirrors assocs classes
-io io.styles arrays hashtables math.order sorting refs fonts
+colors.constants models.filter 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.tables
-ui.gadgets.status-bar ui.gadgets.labeled
-ui.tools.common ui ;
+ui.gadgets.scrollers ui.gadgets.slots ui.gadgets.tracks ui.gestures
+ui.gadgets.buttons ui.gadgets.tables ui.gadgets.status-bar
+ui.gadgets.labeled ui.tools.common ui ;
IN: ui.tools.inspector
TUPLE: inspector-gadget < tool table ;
: <inspector-table> ( model -- table )
[ make-slot-descriptions ] <filter> inspector-renderer <table>
- [ dup primary-operation invoke-command ] >>action
+ [ invoke-primary-operation ] >>action
monospace-font >>font
+ COLOR: dark-gray >>column-line-color
+ 6 >>gap
15 >>min-rows
15 >>max-rows
40 >>min-cols