Add multi-touch commands to walker tool

db4
Slava Pestov 2009-02-17 08:23:04 -06:00
parent c7dc4f1080
commit e093057e80
2 changed files with 11 additions and 3 deletions
basis/ui/tools/walker

View File

@ -36,6 +36,7 @@ $nl
"Walkers are instances of " { $link walker-gadget } "."
{ $subsection "ui-walker-step" }
{ $subsection "breakpoints" }
{ $command-map walker-gadget "toolbar" } ;
{ $command-map walker-gadget "toolbar" }
{ $command-map walker-gadget "multitouch" } ;
ABOUT: "ui-walker"

View File

@ -13,8 +13,6 @@ status continuation thread
traceback
closing? ;
{ 620 620 } walker-gadget set-tool-dim
: walker-command ( walker msg -- )
swap
dup thread>> thread-registered?
@ -83,6 +81,15 @@ walker-gadget "toolbar" f {
{ T{ key-down f f "F1" } walker-help }
} define-command-map
walker-gadget "multitouch" f {
{ left-action com-back }
{ right-action com-step }
{ up-action com-out }
{ down-action com-into }
{ zoom-out-action close-window }
{ zoom-in-action com-abandon }
} define-command-map
: walker-for-thread? ( thread gadget -- ? )
{
{ [ dup walker-gadget? not ] [ 2drop f ] }