1 ! Copyright (C) 2006, 2009 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: kernel literals memory namespaces sequences system ui
4 ui.backend ui.commands ui.gestures ui.tools.browser
5 ui.tools.common ui.tools.error-list ui.tools.listener
9 \ refresh-all H{ { +nullary+ t } { +listener+ t } } define-command
11 \ save H{ { +nullary+ t } } define-command
13 : com-exit ( -- ) 0 exit ;
15 \ com-exit H{ { +nullary+ t } } define-command
17 tool "tool-switching" f {
18 { T{ key-down f ${ os macosx? M+ A+ ? } "l" } show-listener }
19 { T{ key-down f ${ os macosx? M+ A+ ? } "L" } listener-window }
20 { T{ key-down f ${ os macosx? M+ A+ ? } "b" } show-browser }
21 { T{ key-down f ${ os macosx? M+ A+ ? } "B" } browser-window }
25 { T{ key-down f ${ os macosx? M+ A+ ? } "q" } com-exit }
26 { T{ key-down f f "F2" } refresh-all }
27 { T{ key-down f f "F3" } show-error-list }
29 { T{ key-down f { M+ } "w" } close-window }
30 { T{ key-down f { M+ } "q" } com-exit }
31 { T{ key-down f { C+ M+ } "f" } toggle-fullscreen }
33 { T{ key-down f { C+ } "w" } close-window }
34 { T{ key-down f { C+ } "F4" } close-window }
35 { T{ key-down f { A+ } "F4" } com-exit }
36 { T{ key-down f f "F11" } ? toggle-fullscreen }
37 } ? prepend define-command-map
39 : ui-tools-main ( -- )
40 f ui-stop-after-last-window? set-global