#!/bin/sh # MetaCard 2.4 stack # The following is not ASCII text, # so now would be a good time to q out of more exec mc $0 "$@" 6 CFX_TreeField " ff ff 33 ff33 ff % Califex Tree Field X U Monaco U Verdana U ProFont U Arial W Arial W Arial U verdana U verdana U Arial U Arial W Arial W Arial U Lucida Grande menuGroup P)on TreeClicked pline, pchanged put empty into fld "level" put the VisibleCat of fld "tree" into fld "viscat" set the delimiter of fld "tree" to fld "delim" put the ChosenPath of fld "tree" into fld "path" put the ChosenLine of fld "tree" into fld "line" of grp "chosen" put the ChosenText of fld "tree" into fld "text" of grp "chosen" end TreeClicked on preopenCard if the platform is "macOS" then set the lookandfeel to "macintosh" put empty into fld "cat" put empty into fld "path" put empty into fld "tree" put empty into fld "viscat" put empty into fld "line" put empty into fld "level" put empty into fld "show" put " | " into fld "delim" put fld "jose" into fld "outline" set the hilite of btn "HandleOnly" to false set the HandleOnly of fld "tree" to false set the hilite of btn "useImages" to false set the UseImages of fld "tree" to false disable grp "cat" disable grp "viscat" disable grp "tree" disable grp "chosen" disable grp "expandto" disable btn "fullexpansion" end preopenCard cREVGeneral bookmarks handlerList TreeClicked preopenCardscriptSelection char 385 to 384tempScript 8
on TreeClicked pline, pchanged
put empty into fld "level"
put the VisibleCat of fld "tree" into fld "viscat"
set the delimiter of fld "tree" to fld "delim"
put the ChosenPath of fld "tree" into fld "path"
put the ChosenLine of fld "tree" into fld "line" of grp "chosen"
put the ChosenText of fld "tree" into fld "text" of grp "chosen"
end TreeClicked
on preopenCard
put empty into fld "cat"
put empty into fld "path"
put empty into fld "tree"
put empty into fld "viscat"
put empty into fld "line"
put empty into fld "level"
put empty into fld "show"
put " | " into fld "delim"
put fld "jose" into fld "outline"
set the hilite of btn "HandleOnly" to false
set the HandleOnly of fld "tree" to false
set the hilite of btn "useImages" to false
set the UseImages of fld "tree" to false
disable grp "cat"
disable grp "viscat"
disable grp "tree"
disable grp "chosen"
disable grp "expandto"
disable btn "fullexpansion"
end preopenCard
prevHandler TreeClickedscript ! " # & ( ) * - . ' expandTo ,kfon mouseUp if fld "level" is not a number then put 0 into fld "level" if the target contains "expand" then add 1 to fld "level" else if the target contains "contract" then put max( fld "level" - 1, 0 ) into fld "level" end if set the Expansion of fld "tree" to fld "level" put the VisibleCat of fld "Tree" into fld "viscat" end mouseUp a ! Expand to: level i` expand eg >> contract eg <<