factor/library/help/topics.facts

71 lines
3.3 KiB
Plaintext

IN: help
USING: io ;
HELP: articles
{ $var-description "Hashtable mapping article names to " { $link article } " instances." } ;
HELP: no-article
{ $values { "name" "an article name" } }
{ $description "Throws a " { $link no-article } " error." }
{ $error-description "Thrown by " { $link help } " if the given help topic does not exist, or if the help topic being dispayed links to a help topic which does not exist." } ;
HELP: article
{ $values { "name" "an article name" } { "article" "an " { $link article } " object" } }
{ $description "Outputs a named " { $link article } " object." } ;
HELP: article-title ( topic -- string )
{ $values { "topic" "an article name or a word" } { "string" "a string" } }
{ $description "Outputs the title of a specific help article." } ;
HELP: article-content ( topic -- element )
{ $values { "topic" "an article name or a word" } { "element" "a markup element" } }
{ $description "Outputs the content of a specific help article." } ;
HELP: all-articles
{ $values { "seq" "a sequence" } }
{ $description "Outputs a sequence of all help article names, and all words with documentation." } ;
HELP: elements
{ $values { "elt-type" "a word" } { "element" "a markup element" } { "seq" "a new sequence" } }
{ $description "Outputs a sequence of all elements of type " { $snippet "elt-type" } " found by traversing " { $snippet "element" } "." } ;
HELP: collect-elements
{ $values { "element" "a markup element" } { "seq" "a sequence of words" } { "elements" "a new sequence" } }
{ $description "Collects the arguments of all sub-elements of " { $snippet "element" } " whose markup element type occurs in " { $snippet "seq" } "." }
{ $notes "Used to implement " { $link children } "." } ;
HELP: parent-graph
{ $var-description "A graph whose vertices are help articles and edges are subsections. See " { $link "graphs" } "." }
{ $see-also children parents xref-help } ;
HELP: children
{ $values { "topic" "an article name or a word" } { "seq" "a new sequence" } }
{ $description "Outputs a sequence of all subsections of " { $snippet "topic" } "." } ;
HELP: parents
{ $values { "topic" "an article name or a word" } { "seq" "a new sequence" } }
{ $description "Outputs a sequence of all help articles which contain " { $snippet "topic" } " as a subsection." } ;
HELP: doc-path
{ $values { "topic" "an article name or a word" } { "seq" "a new sequence" } }
{ $description "Outputs a sequence of all help articles which contain " { $snippet "topic" } " as a subsection, traversing all the way up to the root." }
{ $examples
{ $example "\"sequences\" doc-path ." "{ \"collections\" \"handbook\" }" }
} ;
HELP: xref-article
{ $values { "topic" "an article name or a word" } }
{ $description "Adds an article to the " { $link parent-graph } " graph." }
$low-level-note ;
HELP: unxref-article
{ $values { "topic" "an article name or a word" } }
{ $description "Removes an article to the " { $link parent-graph } " graph." }
$low-level-note ;
HELP: xref-help
{ $description "Update the " { $link parent-graph } ". Usually this is done automatically." } ;
HELP: link
{ $class-description "Class of help article presentations. Instances can be passed to " { $link write-object } " to output a clickable hyperlink. Also, instances of this class are valid definition specifiers; see " { $link "definitions" } "." } ;