ui: more docs and tests
parent
9e9b70005b
commit
3aac5a6591
|
@ -0,0 +1,5 @@
|
|||
USING: help.markup help.syntax ;
|
||||
IN: ui.backend
|
||||
|
||||
HELP: stop-event-loop
|
||||
{ $description "Called by the UI to tell the backend to stop itself. Only needed by the GTK backend that otherwise gets stuck in 'gtk_main'." } ;
|
|
@ -0,0 +1,6 @@
|
|||
USING: help.markup help.syntax kernel ;
|
||||
IN: ui.event-loop
|
||||
|
||||
HELP: event-loop?
|
||||
{ $values { "?" boolean } }
|
||||
{ $description { $link t } " if there is active windows." } ;
|
|
@ -128,6 +128,10 @@ HELP: draw-world*
|
|||
{ $values { "world" world } }
|
||||
{ $description "Called when " { $snippet "world" } " needs to be redrawn. The world's OpenGL context is current when this method is called." } ;
|
||||
|
||||
HELP: ui-error-hook
|
||||
{ $var-description "A quotation that is called if an error occurs in the UI updating thread." }
|
||||
{ $see-also ui-error } ;
|
||||
|
||||
ARTICLE: "ui.gadgets.worlds-subclassing" "Subclassing worlds"
|
||||
"The " { $link world } " gadget can be subclassed, giving Factor code full control of the window's OpenGL context. The following generic words can be overridden to replace standard UI behavior:"
|
||||
{ $subsections
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
USING: kernel tools.test ui.gadgets.worlds ui.tools.debugger ;
|
||||
IN: ui.tools.debugger.tests
|
||||
|
||||
|
||||
{ f } [
|
||||
f <world-attributes> <world> world-error boa error-in-debugger?
|
||||
] unit-test
|
|
@ -64,7 +64,7 @@ M: debugger focusable-child*
|
|||
GENERIC: error-in-debugger? ( error -- ? )
|
||||
|
||||
M: world-error error-in-debugger?
|
||||
world>> children>> [ f ] [ first debugger? ] if-empty ;
|
||||
world>> children>> ?first debugger? ;
|
||||
|
||||
M: object error-in-debugger? drop f ;
|
||||
|
||||
|
|
Loading…
Reference in New Issue