help fixes
parent
ff6ba6ca36
commit
3131680364
|
@ -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." ;
|
|
@ -56,7 +56,7 @@ $terpri
|
||||||
"Some mathematical operations are only supported on integers."
|
"Some mathematical operations are only supported on integers."
|
||||||
{ $subsection "modular-arithmetic" }
|
{ $subsection "modular-arithmetic" }
|
||||||
{ $subsection "bitwise-arithmetic" }
|
{ $subsection "bitwise-arithmetic" }
|
||||||
{ $subsection "rational numbers" } ;
|
{ $subsection "random-numbers" } ;
|
||||||
|
|
||||||
ARTICLE: "modular-arithmetic" "Modular arithmetic"
|
ARTICLE: "modular-arithmetic" "Modular arithmetic"
|
||||||
{ $subsection mod }
|
{ $subsection mod }
|
||||||
|
|
|
@ -196,5 +196,3 @@ $terpri
|
||||||
{ $subsection "tutorial-classes" }
|
{ $subsection "tutorial-classes" }
|
||||||
{ $subsection "tutorial-library" }
|
{ $subsection "tutorial-library" }
|
||||||
{ $subsection "tutorial-more" } ;
|
{ $subsection "tutorial-more" } ;
|
||||||
|
|
||||||
: tutorial "tutorial" help ;
|
|
||||||
|
|
|
@ -250,6 +250,7 @@ vectors words ;
|
||||||
|
|
||||||
"/doc/handbook/collections.facts"
|
"/doc/handbook/collections.facts"
|
||||||
"/doc/handbook/dataflow.facts"
|
"/doc/handbook/dataflow.facts"
|
||||||
|
"/doc/handbook/handbook.facts"
|
||||||
"/doc/handbook/math.facts"
|
"/doc/handbook/math.facts"
|
||||||
"/doc/handbook/objects.facts"
|
"/doc/handbook/objects.facts"
|
||||||
"/doc/handbook/parser.facts"
|
"/doc/handbook/parser.facts"
|
||||||
|
|
|
@ -42,14 +42,14 @@ SYMBOL: browser-pane
|
||||||
datastack-hook get call stack-bar get show-stack
|
datastack-hook get call stack-bar get show-stack
|
||||||
word-completion ;
|
word-completion ;
|
||||||
|
|
||||||
: tutorial-button
|
: help-button
|
||||||
{ "tutorial" } $link terpri ;
|
"Please read the " write { "handbook" } $link "." print ;
|
||||||
|
|
||||||
: listener-thread
|
: listener-thread
|
||||||
pane get [
|
pane get [
|
||||||
[ ui-listener-hook ] listener-hook set
|
[ ui-listener-hook ] listener-hook set
|
||||||
tutorial-button
|
help-button
|
||||||
tty
|
listener
|
||||||
] with-stream* ;
|
] with-stream* ;
|
||||||
|
|
||||||
M: label set-message ( string/f status -- )
|
M: label set-message ( string/f status -- )
|
||||||
|
|
|
@ -30,8 +30,6 @@ global [ first-time on ] bind
|
||||||
IN: shells
|
IN: shells
|
||||||
|
|
||||||
: ui ( -- )
|
: ui ( -- )
|
||||||
#! Start the Factor graphics subsystem with the given screen
|
|
||||||
#! dimensions.
|
|
||||||
check-running [
|
check-running [
|
||||||
init-world world get rect-dim first2
|
init-world world get rect-dim first2
|
||||||
[ listener-application run-world ] with-gl-screen
|
[ listener-application run-world ] with-gl-screen
|
||||||
|
|
Loading…
Reference in New Issue