]> gitweb.factorcode.org Git - factor.git/blob - doc/handbook/ui/tools.facts
c76c2a0c3068722e22ca970023ed4a20fedc6df0
[factor.git] / doc / handbook / ui / tools.facts
1 USING: gadgets gadgets-listener gadgets-browser gadgets-help
2 gadgets-walker gadgets-dataflow gadgets-workspace help
3 gadgets-panes gadgets-text listener ;
4
5 ARTICLE: "ui-listener" "UI listener"
6 "The graphical listener is based around the terminal listener (" { $link "listener" } ") and adds an input history and clickable output presentations (" { $link "styles" } ")."
7 { $commands listener-gadget }
8 "The word commands appearing in the below list operate on the token at the caret position in the input area. The quotation commands operate on the entire contents of the input area. The walker and dataflow tools are invoked using these commands."
9 { $commands interactor }
10 "Listeners are instances of " { $link listener-gadget } ". The listener consists of an output area (instance of " { $link pane } "), an input area (instance of " { $link interactor } "), and a stack display kept up to date using a " { $link listener-hook } "." ;
11
12 ARTICLE: "ui-browser" "UI definition browser"
13 { $commands browser }
14 "Definition browsers are instances of " { $link browser } "." ;
15
16 ARTICLE: "ui-help" "UI documentation browser"
17 "The documentation browser is used to display Factor documentation, which is rooted at the " { $link "handbook" } " page."
18 { $commands help-gadget }
19 "Documentation browsers are instances of " { $link help-gadget } "." ;
20
21 ARTICLE: "ui-walker" "UI walker"
22 "The walker single-steps through quotations. To use the walker, enter a piece of code in the listener's input area and press " { $snippet "C+A+w" } "."
23 $terpri
24 "The walker can travel backwards through time, and restore stacks. This does not undo side effects and therefore can only be used reliably on referentially transparent code."
25 { $commands walker-gadget }
26 "Walkers are instances of " { $link walker-gadget } "." ;
27
28 ARTICLE: "ui-dataflow" "UI dataflow tool"
29 "The dataflow viewer displays the stack effect of a quotation in a graphical way. To use it, enter a piece of code in the listener's input area and press " { $snippet "C+A+d" } ", or click the " { $strong "Dataflow" } " button in a definition tile shown by the UI browser."
30 $terpri
31 "Only quotations and words for which a stack effect can be inferred can be viewed. See " { $link "inference" } "."
32 $terpri
33 "The dataflow viewer displays the dataflow intermediate representation output by the compiler's optimizer. Therefore inlining and various other optimizations will have already been performed, and the visual representation may not resemble your original code in many ways. An upside of this arrangement is that the dataflow viewer can be used to predict how fast the code will run, because you will see which layers of generic dispatch have been optimized out at compile time."
34 { $commands dataflow-gadget }
35 "Dataflow viewers are instances of " { $link dataflow-gadget } "." ;
36
37 ARTICLE: "ui-tools" "Development tools in the UI"
38 "UI development tools are integrated into a single-window " { $emphasis "workspace" } ". Multiple workspaces can be open at once, and keyboard commands are provided for switching between tools."
39 { $commands workspace }
40 "Workspaces are instances of " { $link workspace-window } "."
41 { $subsection "ui-listener" }
42 { $subsection "ui-browser" }
43 { $subsection "ui-help" }
44 { $subsection "ui-walker" }
45 { $subsection "ui-dataflow" } ;