]> gitweb.factorcode.org Git - factor.git/commitdiff
Update old accessors from 'ui.gestures'
authorEduardo Cavazos <dharmatech@finkelstein.stackeffects.info>
Mon, 1 Sep 2008 04:35:32 +0000 (23:35 -0500)
committerEduardo Cavazos <dharmatech@finkelstein.stackeffects.info>
Mon, 1 Sep 2008 04:35:32 +0000 (23:35 -0500)
basis/ui/gestures/gestures-docs.factor
basis/ui/gestures/gestures.factor

index bcf7eb5ca885a2af34a0ba33d100038c8b85013c..0575ff17f04e7f00235e58fc27f054adf02fd110 100644 (file)
@@ -30,13 +30,13 @@ HELP: motion
 { $examples { $code "T{ motion }" } } ;
 
 HELP: drag
-{ $class-description "Mouse drag gesture. The " { $link drag-# } " slot is either set to a mouse button number, or " { $link f } " indicating no specific button is expected." } ;
+{ $class-description "Mouse drag gesture. The " { $snippet "#" } " slot is either set to a mouse button number, or " { $link f } " indicating no specific button is expected." } ;
 
 HELP: button-up
 { $class-description "Mouse button up gesture. Instances have two slots:"
     { $list
-        { { $link button-up-mods } " - a sequence of modifiers; see " { $link "keyboard-gestures" } }
-        { { $link button-up-# } " - a mouse button number, or " { $link f } " indicating no specific button is expected" }
+        { { $snippet "mods" } " - a sequence of modifiers; see " { $link "keyboard-gestures" } }
+        { { $snippet "#" } " - a mouse button number, or " { $link f } " indicating no specific button is expected" }
     }
 }
 { $examples { $code "T{ button-up f f 1 }" "T{ button-up }" } } ;
@@ -44,8 +44,8 @@ HELP: button-up
 HELP: button-down
 { $class-description "Mouse button down gesture. Instances have two slots:"
     { $list
-        { { $link button-down-mods } " - a sequence of modifiers; see " { $link "keyboard-gestures" } }
-        { { $link button-down-# } " - a mouse button number, or " { $link f } " indicating no specific button is expected" }
+        { { $snippet "mods" } " - a sequence of modifiers; see " { $link "keyboard-gestures" } }
+        { { $snippet "#" } " - a mouse button number, or " { $link f } " indicating no specific button is expected" }
     }
 }
 { $examples { $code "T{ button-down f f 1 }" "T{ button-down }" } } ;
@@ -109,8 +109,8 @@ HELP: S+
 HELP: key-down
 { $class-description "Key down gesture. Instances have two slots:"
     { $list
-        { { $link key-down-mods } " - a sequence of modifiers; see " { $link "keyboard-gestures" } }
-    { { $link key-down-sym } " - a string denoting the key pressed; see " { $link "keyboard-gestures" } }
+        { { $snippet "mods" } " - a sequence of modifiers; see " { $link "keyboard-gestures" } }
+    { { $snippet "sym" } " - a string denoting the key pressed; see " { $link "keyboard-gestures" } }
     }
 }
 { $examples { $code "T{ key-down f { C+ } \"a\" }" "T{ key-down f f \"TAB\" }" } } ;
@@ -118,8 +118,8 @@ HELP: key-down
 HELP: key-up
 { $class-description "Key up gesture. Instances have two slots:"
     { $list
-        { { $link key-up-mods } " - a sequence of modifiers; see " { $link "keyboard-gestures" } }
-    { { $link key-up-sym } " - a string denoting the key pressed; see " { $link "keyboard-gestures" } }
+        { { $snippet "mods" } " - a sequence of modifiers; see " { $link "keyboard-gestures" } }
+    { { $snippet "sym" } " - a string denoting the key pressed; see " { $link "keyboard-gestures" } }
     }
 }
 { $examples { $code "T{ key-up f { C+ } \"a\" }" "T{ key-up f f \"TAB\" }" } } ;
index 95417ac71fa734fb18e14c1b654bc8ba75419b2f..6b53d25ea1b2bb1ebc3ae51c0f999746c6e5bcaf 100755 (executable)
@@ -226,14 +226,14 @@ SYMBOL: drag-timer
 : send-button-down ( gesture loc world -- )
     move-hand
     start-drag-timer
-    dup button-down-#
+    dup #>>
     dup update-click# hand-buttons get-global push
     update-clicked
     button-gesture ;
 
 : send-button-up ( gesture loc world -- )
     move-hand
-    dup button-up-# hand-buttons get-global delete
+    dup #>> hand-buttons get-global delete
     stop-drag-timer
     button-gesture ;
 
@@ -261,21 +261,21 @@ GENERIC: gesture>string ( gesture -- string/f )
     [ name>> ] map concat >string ;
 
 M: key-down gesture>string
-    dup key-down-mods modifiers>string
-    swap key-down-sym append ;
+    dup mods>> modifiers>string
+    swap sym>> append ;
 
 M: button-up gesture>string
     [
-        dup button-up-mods modifiers>string %
+        dup mods>> modifiers>string %
         "Click Button" %
-        button-up-# [ " " % # ] when*
+        #>> [ " " % # ] when*
     ] "" make ;
 
 M: button-down gesture>string
     [
-        dup button-down-mods modifiers>string %
+        dup mods>> modifiers>string %
         "Press Button" %
-        button-down-# [ " " % # ] when*
+        #>> [ " " % # ] when*
     ] "" make ;
 
 M: left-action gesture>string drop "Swipe left" ;