]> gitweb.factorcode.org Git - factor.git/commitdiff
ui.*: doc updates
authorBjörn Lindqvist <bjourne@gmail.com>
Thu, 18 Jan 2018 02:43:32 +0000 (03:43 +0100)
committerBjörn Lindqvist <bjourne@gmail.com>
Thu, 18 Jan 2018 15:48:35 +0000 (16:48 +0100)
basis/ui/event-loop/event-loop-docs.factor
basis/ui/gadgets/gadgets-docs.factor
basis/ui/ui-docs.factor

index a262911149cd53c157b2ffc6177ac512fec2830d..eb23d9f9b86be8042c0d20678d096388e5e0497a 100644 (file)
@@ -3,4 +3,4 @@ IN: ui.event-loop
 
 HELP: event-loop?
 { $values { "?" boolean } }
-{ $description { $link t } " if there is active windows." } ;
+{ $description { $link t } " if there are active windows." } ;
index 9d9b8309900c1c24791ebcf3e44843bf8cfc6c36..f5f6def67d709e5bf16d5a8ec6e3960d227fad95 100644 (file)
@@ -6,6 +6,11 @@ HELP: <gadget>
 { $values { "gadget" "a new " { $link gadget } } }
 { $description "Creates a new gadget." } ;
 
+HELP: children-on
+{ $values { "rect" rect } { "gadget" gadget } { "seq" "a sequence of gadgets" } }
+{ $contract "Outputs a sequence of gadgets which potentially intersect a rectangle in the co-ordinate system of the gadget." }
+{ $notes "This does not have to be an accurate intersection test, and simply returning " { $link children>> } " is a valid implementation. However, an accurate intersection test reduces the amount of work done when drawing this gadget if it is partially clipped and not all children are visible." } ;
+
 HELP: control-value
 { $values { "control" gadget } { "value" object } }
 { $description "Outputs the value of the control's model." } ;
@@ -19,6 +24,10 @@ HELP: notify
 { $description "Notifies the gadget that it has a graft message to handle." }
 { $see-also graft* ungraft* } ;
 
+HELP: notify-ui-thread
+{ $description "Notifies the UI thread that there is work to do." }
+{ $see-also ui-notify-flag } ;
+
 HELP: nth-gadget
 { $values { "n" "a non-negative integer" } { "gadget" gadget } { "child" gadget } }
 { $description "Outputs the " { $snippet "n" } "th child of the gadget." }
@@ -37,11 +46,6 @@ HELP: user-input*
 { $values { "str" string } { "gadget" gadget } { "?" boolean } }
 { $contract "Handle free-form textual input while the gadget has keyboard focus." } ;
 
-HELP: children-on
-{ $values { "rect" rect } { "gadget" gadget } { "seq" "a sequence of gadgets" } }
-{ $contract "Outputs a sequence of gadgets which potentially intersect a rectangle in the co-ordinate system of the gadget." }
-{ $notes "This does not have to be an accurate intersection test, and simply returning " { $link children>> } " is a valid implementation. However, an accurate intersection test reduces the amount of work done when drawing this gadget if it is partially clipped and not all children are visible." } ;
-
 HELP: pick-up
 { $values { "point" "a pair of integers" } { "gadget" gadget } { "child/f" { $maybe gadget } } }
 { $description "Outputs the child at a point in the gadget's co-ordinate system. This word recursively descends the gadget hierarchy, and so outputs the deepest child." } ;
@@ -70,7 +74,7 @@ HELP: relayout
 
 HELP: relayout-1
 { $values { "gadget" gadget } }
-{ $description "Relayout and redraw a gadget before the next iteration of the event loop. Unlike " { $link relayout } ", this does not propagate requests up to the parent, and so this word should only be used when the gadget's internal layout or appearance has changed, but the dimensions have not." } ;
+{ $description "Relayout and redraw a gadget before the next iteration of the event loop. Unlike " { $link relayout } ", this does not propagate requests up to the parent, and so this word should be used when the gadget's internal layout or appearance has changed, but the dimensions have not." } ;
 
 { relayout relayout-1 } related-words
 
index 9560ddce034c09074c00047f2e8c25529d86fe00..c97354e18bcdd822e68e80741ec3214aeb28de05 100644 (file)
@@ -6,15 +6,19 @@ vocabs.loader ;
 
 IN: ui
 
+HELP: open-window
+{ $values { "gadget" gadget } { "title/attributes" { "a " { $link string } " or a " { $link world-attributes } " tuple" } } }
+{ $description "Opens a native window containing " { $snippet "gadget" } " with the specified attributes. If a string is provided, it is used as the window title; otherwise, the window attributes are specified in a " { $link world-attributes } " tuple." } ;
+
+HELP: ui-running?
+{ $values { "?" boolean } }
+{ $description "Whether the UI is running or not." } ;
+
 HELP: ui-windows
 { $var-description "Global variable holding an association list mapping native window handles to " { $link world } " instances." } ;
 
 { ui-windows open-window find-window world-attributes } related-words
 
-HELP: open-window
-{ $values { "gadget" gadget } { "title/attributes" { "a " { $link string } " or a " { $link world-attributes } " tuple" } } }
-{ $description "Opens a native window containing " { $snippet "gadget" } " with the specified attributes. If a string is provided, it is used as the window title; otherwise, the window attributes are specified in a " { $link world-attributes } " tuple." } ;
-
 HELP: close-window
 { $values { "gadget" gadget } }
 { $description "Close the native window containing " { $snippet "gadget" } "." } ;