From fe2c2d23de9e300d7cd1b04e139dfbdd2069d00a Mon Sep 17 00:00:00 2001 From: Mark Green Date: Sat, 21 Feb 2015 20:45:01 +0000 Subject: [PATCH] Adding help for and . --- basis/ui/gadgets/editors/editors-docs.factor | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/basis/ui/gadgets/editors/editors-docs.factor b/basis/ui/gadgets/editors/editors-docs.factor index 47136fb6b5..3ebd1cc831 100644 --- a/basis/ui/gadgets/editors/editors-docs.factor +++ b/basis/ui/gadgets/editors/editors-docs.factor @@ -1,5 +1,5 @@ USING: documents help.markup help.syntax ui.gadgets -ui.gadgets.scrollers models strings ui.commands +ui.gadgets.scrollers models strings ui.commands sequences ui.text colors fonts help.tips ; IN: ui.gadgets.editors @@ -57,10 +57,21 @@ HELP: remove-selection { $values { "editor" editor } } { $description "Removes currently selected text from the editor's " { $link document } "." } ; +HELP: +{ $values { "model" model } { "gadget" editor } } +{ $description "Creates an editor gadget which targets the specified model. The model must contain a string, or another item with a defined " { $link length } ", as this will be checked during layout." } ; + +HELP: +{ $values { "quot" "a quotation ( string -- )" } { "gadget" editor } } +{ $description "Creates an editor gadget with a blank model. Whenever a value is entered into the editor and Return pressed, the value is pushed on the stack as a string and the specified quotation is called. Note that the quotation cannot update the value in the field. " } ; + + HELP: editor-string { $values { "editor" editor } { "string" string } } { $description "Outputs the contents of the editor's " { $link document } " as a string. Lines are separated by " { $snippet "\\n" } "." } ; + + HELP: set-editor-string { $values { "string" string } { "editor" editor } } { $description "Sets the contents of the editor's " { $link document } " to a string, which may use either " { $snippet "\\n" } ", " { $snippet "\\r\\n" } " or " { $snippet "\\r" } " line separators." } ; -- 2.34.1