diff --git a/doc/handbook/handbook.facts b/doc/handbook/handbook.facts new file mode 100644 index 0000000000..870cf09bdd --- /dev/null +++ b/doc/handbook/handbook.facts @@ -0,0 +1,34 @@ +USING: help parser prettyprint ; + +ARTICLE: "handbook" "Factor documentation" +"Welcome to Factor! Factor documentation is takes the form of an outline, with cross-referencing hyperlinks between topics. You can click the triangle next to a topic heading to expand the topic:" +{ $subsection "presentation-intro" } +"There is a short language tutorial:" +{ $subsection "tutorial" } +"Some words for performing common operations at the listener:" +{ $list + { + "You can read the documentation for a word with " { $link help } ":" + { $code "\\ reverse help" } + } + { "You can print the top of the stack with " { $link . } } + { + "Source files are loaded with " { $link run-file } ":" + { $code "\"tetris.factor\" run-file" } + } +} +"Detailed documentation:" +{ $subsection "syntax" } +{ $subsection "dataflow" } +{ $subsection "words" } +{ $subsection "objects" } +{ $subsection "math" } +{ $subsection "collections" } +{ $subsection "parser" } ; + +ARTICLE: "presentation-intro" "The presentation-based UI" +"Factor provides a " { $emphasis "presentation-based" } " user interface. A " { $emphasis "presentation" } " is a graphical representation of a live object. You can see presentations everywhere; help links, words, and code examples are all presentations." +$terpri +"When you place the mouse over a presentation, it is highlighted with a surrounding border." +$terpri +"Clicking a presentation with the left mouse button invokes a default command. Clicking the right mouse button displays a menu of applicable commands." ; diff --git a/doc/handbook/math.facts b/doc/handbook/math.facts index a651da2590..445e04ba17 100644 --- a/doc/handbook/math.facts +++ b/doc/handbook/math.facts @@ -56,7 +56,7 @@ $terpri "Some mathematical operations are only supported on integers." { $subsection "modular-arithmetic" } { $subsection "bitwise-arithmetic" } -{ $subsection "rational numbers" } ; +{ $subsection "random-numbers" } ; ARTICLE: "modular-arithmetic" "Modular arithmetic" { $subsection mod } diff --git a/doc/handbook/tutorial.facts b/doc/handbook/tutorial.facts index faeaee50c7..ca2f57c468 100644 --- a/doc/handbook/tutorial.facts +++ b/doc/handbook/tutorial.facts @@ -196,5 +196,3 @@ $terpri { $subsection "tutorial-classes" } { $subsection "tutorial-library" } { $subsection "tutorial-more" } ; - -: tutorial "tutorial" help ; diff --git a/library/bootstrap/boot-stage1.factor b/library/bootstrap/boot-stage1.factor index 8af383d8bc..4969004907 100644 --- a/library/bootstrap/boot-stage1.factor +++ b/library/bootstrap/boot-stage1.factor @@ -250,6 +250,7 @@ vectors words ; "/doc/handbook/collections.facts" "/doc/handbook/dataflow.facts" + "/doc/handbook/handbook.facts" "/doc/handbook/math.facts" "/doc/handbook/objects.facts" "/doc/handbook/parser.facts" diff --git a/library/ui/listener.factor b/library/ui/listener.factor index 7701772be9..81383fb462 100644 --- a/library/ui/listener.factor +++ b/library/ui/listener.factor @@ -42,14 +42,14 @@ SYMBOL: browser-pane datastack-hook get call stack-bar get show-stack word-completion ; -: tutorial-button - { "tutorial" } $link terpri ; +: help-button + "Please read the " write { "handbook" } $link "." print ; : listener-thread pane get [ [ ui-listener-hook ] listener-hook set - tutorial-button - tty + help-button + listener ] with-stream* ; M: label set-message ( string/f status -- ) diff --git a/library/ui/ui.factor b/library/ui/ui.factor index fde6ad6150..fb80d5c90d 100644 --- a/library/ui/ui.factor +++ b/library/ui/ui.factor @@ -30,8 +30,6 @@ global [ first-time on ] bind IN: shells : ui ( -- ) - #! Start the Factor graphics subsystem with the given screen - #! dimensions. check-running [ init-world world get rect-dim first2 [ listener-application run-world ] with-gl-screen