ui.gadgets.slots: move to ui.tools.inspector.slots.

factor-shell
John Benediktsson 2017-10-25 16:17:08 -07:00
parent b90f37b13e
commit c22e55ce48
7 changed files with 27 additions and 24 deletions

View File

@ -1,4 +0,0 @@
IN: ui.gadgets.slots.tests
USING: assocs ui.gadgets.slots tools.test refs ;
{ t } [ [ ] [ ] { { 1 1 } { 2 2 } { 3 3 } } 2 <value-ref> <slot-editor> slot-editor? ] unit-test

View File

@ -1,5 +1,5 @@
USING: help.markup help.syntax ui.commands ui.gadgets.slots
ui.gadgets.panes ui.gadgets.editors kernel ;
USING: help.markup help.syntax ui.commands
ui.gadgets.panes ui.gadgets.editors ui.tools.inspector.slots kernel ;
IN: ui.tools.inspector
ARTICLE: "ui-inspector-edit" "Editing slot values in the inspector"

View File

@ -2,13 +2,13 @@
! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays assocs classes combinators fonts fry
hashtables inspector io io.styles kernel math.vectors mirrors
models models.arrow namespaces prettyprint refs sequences
sorting ui ui.commands ui.gadgets ui.gadgets.labeled
ui.gadgets.panes ui.gadgets.scrollers ui.gadgets.slots
ui.gadgets.status-bar ui.gadgets.tables
models models.arrow namespaces prettyprint sequences sorting ui
ui.commands ui.gadgets ui.gadgets.labeled ui.gadgets.panes
ui.gadgets.scrollers ui.gadgets.status-bar ui.gadgets.tables
ui.gadgets.tables.private ui.gadgets.toolbar ui.gadgets.tracks
ui.gadgets.worlds ui.gestures ui.operations ui.theme
ui.tools.browser ui.tools.common ;
ui.gestures ui.operations ui.theme ui.tools.browser
ui.tools.common ui.tools.inspector.slots ;
IN: ui.tools.inspector
TUPLE: inspector-gadget < tool table ;
@ -116,15 +116,6 @@ M: inspector-gadget focusable-child*
\ com-push H{ { +listener+ t } } define-command
: slot-editor-window ( close-hook update-hook assoc key key-string -- )
[ <value-ref> <slot-editor> ]
[
<world-attributes>
swap "Slot editor: " prepend >>title
[ { dialog-window } append ] change-window-controls
] bi*
open-status-window ;
: com-edit-slot ( inspector -- )
[ close-window ] swap
[ '[ _ com-refresh ] ]

View File

@ -0,0 +1,6 @@
USING: assocs tools.test ui.tools.inspector.slots refs ;
{ t } [
[ ] [ ] { { 1 1 } { 2 2 } { 3 3 } } 2 <value-ref>
<slot-editor> slot-editor?
] unit-test

View File

@ -2,9 +2,10 @@
! See http://factorcode.org/license.txt for BSD license.
USING: accessors eval kernel math.vectors parser prettyprint
refs sequences ui.commands ui.gadgets ui.gadgets.editors
ui.gadgets.scrollers ui.gadgets.toolbar ui.gadgets.tracks
ui.gestures ui.tools.common ;
IN: ui.gadgets.slots
ui.gadgets.scrollers ui.gadgets.status-bar ui.gadgets.toolbar
ui.gadgets.tracks ui.gadgets.worlds ui.gestures ui.tools.common
;
IN: ui.tools.inspector.slots
TUPLE: slot-editor < track ref close-hook update-hook text ;
@ -75,3 +76,12 @@ slot-editor "toolbar" f {
{ f delete }
{ T{ key-down f f "ESC" } close }
} define-command-map
: slot-editor-window ( close-hook update-hook assoc key key-string -- )
[ <value-ref> <slot-editor> ]
[
<world-attributes>
swap "Slot editor: " prepend >>title
[ { dialog-window } append ] change-window-controls
] bi*
open-status-window ;