ui.*: doc updates
parent
3147593b2c
commit
78c31ada9e
|
@ -3,4 +3,4 @@ IN: ui.event-loop
|
||||||
|
|
||||||
HELP: event-loop?
|
HELP: event-loop?
|
||||||
{ $values { "?" boolean } }
|
{ $values { "?" boolean } }
|
||||||
{ $description { $link t } " if there is active windows." } ;
|
{ $description { $link t } " if there are active windows." } ;
|
||||||
|
|
|
@ -6,6 +6,11 @@ HELP: <gadget>
|
||||||
{ $values { "gadget" "a new " { $link gadget } } }
|
{ $values { "gadget" "a new " { $link gadget } } }
|
||||||
{ $description "Creates a new 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
|
HELP: control-value
|
||||||
{ $values { "control" gadget } { "value" object } }
|
{ $values { "control" gadget } { "value" object } }
|
||||||
{ $description "Outputs the value of the control's model." } ;
|
{ $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." }
|
{ $description "Notifies the gadget that it has a graft message to handle." }
|
||||||
{ $see-also graft* ungraft* } ;
|
{ $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
|
HELP: nth-gadget
|
||||||
{ $values { "n" "a non-negative integer" } { "gadget" gadget } { "child" gadget } }
|
{ $values { "n" "a non-negative integer" } { "gadget" gadget } { "child" gadget } }
|
||||||
{ $description "Outputs the " { $snippet "n" } "th child of the gadget." }
|
{ $description "Outputs the " { $snippet "n" } "th child of the gadget." }
|
||||||
|
@ -37,11 +46,6 @@ HELP: user-input*
|
||||||
{ $values { "str" string } { "gadget" gadget } { "?" boolean } }
|
{ $values { "str" string } { "gadget" gadget } { "?" boolean } }
|
||||||
{ $contract "Handle free-form textual input while the gadget has keyboard focus." } ;
|
{ $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
|
HELP: pick-up
|
||||||
{ $values { "point" "a pair of integers" } { "gadget" gadget } { "child/f" { $maybe gadget } } }
|
{ $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." } ;
|
{ $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
|
HELP: relayout-1
|
||||||
{ $values { "gadget" gadget } }
|
{ $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
|
{ relayout relayout-1 } related-words
|
||||||
|
|
||||||
|
|
|
@ -6,15 +6,19 @@ vocabs.loader ;
|
||||||
|
|
||||||
IN: ui
|
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
|
HELP: ui-windows
|
||||||
{ $var-description "Global variable holding an association list mapping native window handles to " { $link world } " instances." } ;
|
{ $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
|
{ 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
|
HELP: close-window
|
||||||
{ $values { "gadget" gadget } }
|
{ $values { "gadget" gadget } }
|
||||||
{ $description "Close the native window containing " { $snippet "gadget" } "." } ;
|
{ $description "Close the native window containing " { $snippet "gadget" } "." } ;
|
||||||
|
|
Loading…
Reference in New Issue