]> gitweb.factorcode.org Git - factor.git/blob - basis/ui/tools/tools-docs.factor
d3078cc1788de9027f7dc3908fb8e0064d531fde
[factor.git] / basis / ui / tools / tools-docs.factor
1 USING: editors help.markup help.syntax summary inspector io io.styles
2 listener parser prettyprint tools.profiler tools.walker ui.commands
3 ui.gadgets.panes ui.gadgets.presentations ui.operations
4 ui.tools.operations ui.tools.profiler ui.tools.common vocabs see ;
5 IN: ui.tools
6
7 ARTICLE: "starting-ui-tools" "Starting the UI tools"
8 "The UI tools start automatically where possible:"
9 { $list
10     { "On Windows, the tools start when the Factor executable is run." }
11     { "On X11, the tools start if the " { $snippet "DISPLAY" } " environment variable is set." }
12     { "On Mac OS X, the tools start if the " { $snippet "Factor.app" } " application bundle is run." }
13 }
14 "In all cases, passing the " { $snippet "-run=listener" } " command line switch starts the terminal listener instead. The UI can be started from the terminal by issuing the following command:"
15 { $code "USE: threads" "[ \"ui.tools\" run ] in-thread" } ;
16
17 ARTICLE: "ui-shortcuts" "UI tool keyboard shortcuts"
18 "Every UI tool has its own set of keyboard shortcuts; press " { $snippet "F1" } " inside a tool to see help. Some common shortcuts are also supported by all tools:"
19 { $command-map tool "tool-switching" }
20 { $command-map tool "common" } ;
21
22 ARTICLE: "ui-presentations" "Presentations in the UI"
23 "A " { $emphasis "presentation" } " is a graphical view of an object which is directly linked to the object in some way. The help article links you see in the documentation browser are presentations; and if you " { $link see } " a word in the UI listener, all words in the definition will themselves be presentations."
24 $nl
25 "When you move the mouse over a presentation, it is highlighted with a rectangular border and a short summary of the object being presented is shown in the status bar (the summary is produced using the " { $link summary } " word)."
26 $nl
27 "Clicking a presentation with the left mouse button invokes a default operation, which usually views the object in some way. For example, clicking a presentation of a word jumps to the word definition in the " { $link "ui-browser" } "."
28 $nl
29 "Clicking and holding the right mouse button on a presentation displays a popup menu listing available operations."
30 $nl
31 "For more about presentation gadgets, see " { $link "ui.gadgets.presentations" } "." ;
32
33 ARTICLE: "ui-profiler" "UI profiler" 
34 "The graphical profiler is based on the terminal profiler (see " { $link "profiling" } ") and adds more convenient browsing of profiler results."
35 $nl
36 "To use the profiler, enter a piece of code in the listener input area and press " { $operation com-profile } "."
37 $nl
38 "Clicking on a vocabulary in the vocabulary list narrows down the word list to only include words from that vocabulary. The sorting options control the order of elements in the vocabulary and word lists. The search fields narrow down the list to only include words or vocabularies whose names contain a substring."
39 $nl
40 "Consult " { $link "profiling" } " for details about the profiler itself."
41 { $command-map profiler-gadget "toolbar" }
42 "The profiler is an instance of " { $link profiler-gadget } "." ;
43
44 ARTICLE: "ui-cocoa" "Functionality specific to Mac OS X"
45 "On Mac OS X, the Factor UI offers additional features which integrate with this operating system."
46 $nl
47 "First, a standard Mac-style menu bar is provided, which offers the bare minimum of what you would expect from a Mac OS X application."
48 $nl
49 "Dropping a source file onto the Factor icon in the dock runs the source file in the listener."
50 $nl
51 "If you install " { $strong "Factor.app" } " in your " { $strong "Applications" } " folder, then other applications will be able to call Factor via the System Services feature. For example, you can select some text in " { $strong "TextEdit.app" } ", then invoke the " { $strong "TextEdit->Services->Factor->Evaluate Selection" } " menu item, which will replace the selected text with the result of evaluating it in Factor."
52
53 ;
54
55 ARTICLE: "ui-tools" "UI developer tools"
56 "The " { $vocab-link "ui.tools" } " vocabulary hierarchy implements a collection of simple developer tools."
57 $nl
58 "To take full advantage of the UI tools, you should be using a supported text editor. See " { $link "editor" } "."
59 { $subsection "ui-shortcuts" }
60 { $subsection "ui-presentations" }
61 { $subsection "ui-listener" }
62 { $subsection "ui-browser" }
63 { $subsection "ui-inspector" }
64 { $subsection "ui-profiler" }
65 { $subsection "ui-walker" }
66 { $subsection "ui.tools.deploy" }
67 "Platform-specific features:"
68 { $subsection "ui-cocoa" } ;
69
70 ABOUT: "ui-tools"