]> gitweb.factorcode.org Git - factor.git/blob - basis/ui/tools/tools-docs.factor
Solution to Project Euler problem 65
[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 help.tips ;
6 IN: ui.tools
7
8 ARTICLE: "starting-ui-tools" "Starting the UI tools"
9 "The UI tools start automatically where possible:"
10 { $list
11     { "On Windows, the tools start when the Factor executable is run." }
12     { "On X11, the tools start if the " { $snippet "DISPLAY" } " environment variable is set." }
13     { "On Mac OS X, the tools start if the " { $snippet "Factor.app" } " application bundle is run." }
14 }
15 "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:"
16 { $code "USE: threads" "[ \"ui.tools\" run ] in-thread" } ;
17
18 ARTICLE: "ui-shortcuts" "UI tool keyboard shortcuts"
19 "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:"
20 { $command-map tool "tool-switching" }
21 { $command-map tool "common" } ;
22
23 ARTICLE: "ui-presentations" "Presentations in the UI"
24 "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."
25 $nl
26 "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)."
27 $nl
28 "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" } "."
29 $nl
30 "Clicking and holding the right mouse button on a presentation displays a popup menu listing available operations."
31 $nl
32 "For more about presentation gadgets, see " { $link "ui.gadgets.presentations" } "." ;
33
34 ARTICLE: "ui-cocoa" "Functionality specific to Mac OS X"
35 "On Mac OS X, the Factor UI offers additional features which integrate with this operating system."
36 $nl
37 "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."
38 $nl
39 "Dropping a source file onto the Factor icon in the dock runs the source file in the listener."
40 $nl
41 "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."
42
43 ;
44
45 ARTICLE: "ui-tools" "UI developer tools"
46 "The " { $vocab-link "ui.tools" } " vocabulary hierarchy implements a collection of simple developer tools."
47 { $subsection "starting-ui-tools" }
48 "To take full advantage of the UI tools, you should be using a supported text editor. See " { $link "editor" } "."
49 $nl
50 "Common functionality:"
51 { $subsection "ui-shortcuts" }
52 { $subsection "ui-presentations" }
53 { $subsection "definitions.icons" }
54 "Tools:"
55 { $subsection "ui-listener" }
56 { $subsection "ui-browser" }
57 { $subsection "ui-inspector" }
58 { $subsection "ui.tools.error-list" }
59 { $subsection "ui.tools.profiler" }
60 { $subsection "ui-walker" }
61 { $subsection "ui.tools.deploy" }
62 "Platform-specific features:"
63 { $subsection "ui-cocoa" } ;
64
65 TIP: "All UI developer tools support a common set of " { $link "ui-shortcuts" } ". Each individual tool has its own shortcuts as well; the F1 key is context-sensitive." ;
66
67 ABOUT: "ui-tools"