]> gitweb.factorcode.org Git - factor.git/commitdiff
ui.gadgets.slate: update the help format and code to the modern state
authorAlexander Ilin <alex.ilin@protonmail.com>
Fri, 1 Sep 2023 18:57:34 +0000 (20:57 +0200)
committerAlexander Ilin <alex.ilin@protonmail.com>
Fri, 1 Sep 2023 21:56:00 +0000 (23:56 +0200)
extra/ui/gadgets/slate/slate-docs.factor
extra/ui/gadgets/slate/slate.factor

index 0225c20a1e21a26007b8a52ff7e449c1211d01e4..7dbecb01fd759fdffe13183f3e0dbedea48b503e 100644 (file)
@@ -1,13 +1,15 @@
 ! Copyright (C) 2009 Eduardo Cavazos
 ! See http://factorcode.org/license.txt for BSD license.
-USING: help.markup help.syntax multiline ;
+USING: help.markup help.syntax multiline quotations ui.gadgets ;
 IN: ui.gadgets.slate
 
 ARTICLE: "ui.gadgets.slate" "Slate gadget"
-{ $description "A gadget with an 'action' slot which should be set to a callable."}
-{ $heading "Example" }
-{ $code <" USING: processing.shapes ui.gadgets.slate ui.gadgets.panes ;
-[ { { 10 10 } { 50 30 } { 10 50 } } polygon fill-mode ] <slate>
-gadget."> } ;
+{ $description "A " { $link gadget } " with an " { $slot "action" } " slot that should be set to a " { $link callable } "." }
+{ $examples
+    { $unchecked-example
+        "USING: processing.shapes ui.gadgets.slate ui.gadgets.panes ;"
+        "[ { { 10 10 } { 50 30 } { 10 50 } } draw-polygon fill-mode ] <slate> gadget."
+        "" }
+} ;
 
 ABOUT: "ui.gadgets.slate"
index ac66da44b791f64770e8083cf85e754b930be689..79cb015be300373c613248eb4c4a7a944c8c9ffd 100644 (file)
@@ -76,8 +76,8 @@ USING: combinators arrays sequences math
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-M: slate graft*   ( slate -- ) graft>>   call ;
-M: slate ungraft* ( slate -- ) ungraft>> call ;
+M: slate graft*   ( slate -- ) graft>>   call( -- ) ;
+M: slate ungraft* ( slate -- ) ungraft>> call( -- ) ;
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
@@ -94,7 +94,7 @@ GENERIC: draw-slate ( slate -- slate )
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-M: slate draw-slate ( slate -- slate ) dup action>> call ;
+M: slate draw-slate ( slate -- slate ) dup action>> call( slate -- slate ) ;
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!