#!/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 "$@" E altMenuStack 1 on stripAndShip killImgs killTestStacks put "" into fld "menuFld" end stripAndShip on killImgs repeat with x = the number of imgs on this cd down to 1 if char 1 to 4 of the short name of img x = "menu" then delete img x end repeat end killImgs on killTestStacks if there is a stack "altTestMenu" then delete stack "altTestMenu" end killTestStacks on openStack end openStack on preOpenStack end preOpenStack on doit end doit a |B cConsNoCompilesForArchive 5 currItem card id 1002 prevItem card id 1002cConsNoCompilesForSave 1 U Tahoma U tahoma U Tahoma W tahoma W tahoma U tahoma U Tahoma W Tahoma W Tahoma U Courier New cREVGeometryCache stackID 1093 cREVGeneral debugObjects @ |B cREVGeometryCacheIDs 1130389451510 10761130384390612 10521130361667959 10061130383910931 10481130389454373 10771130385249087 10561130391511011 10861130357880349 10041130374530432 10191130391407748 10821130362438390 10091130389442729 10731130371910182 10131130371914225 10151130373922836 10171130391510998 10831130382989959 10401130389917253 10781130391531971 10871130449669543 10911130389445649 10741130389448638 10751130451730922 10931130376104544 1036 cREVGeometrycache total 24order 1 2 3 4 5 6 : ; > ? C E Test Ep on mouseDown if there is not a stack "altTestMenu" then answer information "Please Build Menu Stack first!" exit mouseDown end if popUp Stack "altTestMenu" end mouseDown f cREVGeneral revUniqueID 1130357880349 menuFld ' { #on selectionChanged --> THIS HUNK OF CODE HELPS TO FIGURE OUT WHAT TABLE CELL YOU JUST CLICKED ON if the lockText of me is false then exit to top put word 2 of the clickLine into tRow put item 1 of the clickLoc into tXLoc subtract the left of me from tXLoc put the tabStops of me into tTabStops --> MAKE SURE THE LAST ITEM IN TABSTOPS IS > TXLOC --> JUST IN CASE THE TABSTOPS HAVE ONLY 1 ITEM --> CREATE tTabStops ITEMS repeat until last item of tTabStops > tXLoc put last item of tTabStops - item -2 of tTabStops into tIncrement put "," & last item of tTabStops + tIncrement after tTabStops end repeat put 1 into tCol repeat while item tCol of tTabStops < tXLoc add 1 to tCol end repeat set itemDel to tab if tCol = 1 then --> USER CLICKED IMAGE answer question "Import New Image?" with "Cancel" or "Clear" or "OK" if it is "Cancel" then unhiliteMe exit to top end if put "menu" & tRow into tImgName if there is an image tImgName then delete img tImgName if it is "OK" then answer file "Choose an image to import" if it is empty then exit to top put it into tPath create image tImgName set the loc of img tImgName to -1000,-1000 put URL ("binfile:" & tPath) into img tImgName end if put item 2 of line tRow of me into tMenuText put "
" & tMenuText & "
Image Text
cREVGeneral revUniqueID 1130374530432 Image Text numMenus ip6on closeField if not isNumber(the text of me) then answer warning "Please use a number!" put 5 into me end if put the text of me into tMenuLines put the number of lines in fld "menuFld" into tFldLines if tFldLines > tMenuLines then answer question "Shorten List to " & tMenulines & " lines?" with "Cancel" or "OK" if it is "Cancel" then put the number of lines in fld "menuFld" into me exit to top end if repeat with x = tFldLines down to tMenuLines +1 delete line x of fld "menuFld" end repeat else --> ADD MORE LINES repeat with x = tFldLines to tMenuLines -1 put cr & tab after fld "menuFld" end repeat end if resizeFld end closeField on exitField closeField end exitField on resizeFld --> RESIZE FLD put the topLeft of fld "menuFld" into tTL put the botRight of fld "menuFld" into tBR put the number of lines of fld "menuFld" into tNum --> 18 IS LINEHEIGHT; 6 IS ?FACTOR put tNum * 18 + 6 into tH set the height of fld "menuFld" to tH set the topLeft of fld "menuFld" to tTL --> RESIZE STACK put the width of this stack into tW put the top of this stack into tT put the left of this stack into tL put the bottom of fld "menuFld" + 5 into tB set the rect of this stack to tL,tT,tL + tW,tT + tB end resizeFld g cREVGeneral revUniqueID 1130371914225breakPoints 9 MenuStackScript Ep--> all handlers on openStack end openStack on preOpenStack end preOpenStack on openCard if the menuAccessMethod of this stack is "mouse" then set the menuAccessMethod of this stack to "" set the prevItem of this stack to (the currItem of this stack) set the currItem of this stack to "" else set the prevItem of this stack to (the currItem of this stack) set the currItem of this stack to (line 1 of the itemList of this stack) end if end openCard setProp CurrItem what if what <> "" then set the backgroundColor of group what to 181,190,214 set the opaque of group what to true put the rect of group what into tRect set the rect of grc "MenuHilite" to (item 1 of tRect),(item 2 of tRect),(item 3 of tRect),(item 4 of tRect) show grc "MenuHilite" end if pass CurrItem end CurrItem setProp PrevItem what if what <> "" then set the opaque of group what to false set the backgroundColor of group what to "" hide grc "MenuHilite" end if pass PrevItem end PrevItem on ExecuteMenuItem pwhat answer information "The item you selected was: '" & pwhat & "'" & cr & cr & "(Replace the code in the 'ExecuteMenuItem' handler in this stack's script with your own.)" end ExecuteMenuItem R cConsLastHandlerName openCard messagecConsLastHandlerScroll 0 cREVGeneral revUniqueID 1130376104544breakPoints MainGroupScript Ep--> all handlers on mouseEnter put the currItem of this stack into cItem set the prevItem of this stack to cItem put the short name of the owner of the target into newItem set the currItem of this stack to newItem end mouseEnter on mouseUp set the prevItem of this stack to (the currItem of this stack) ExecuteMenuItem (the short name of the owner of the target) end mouseUp R cConsLastHandlerName mouseUp messagecConsLastHandlerScroll 0 cREVGeneral revUniqueID 1130382989959 MenuHilite C $$kk cREVGeneral revUniqueID 1130383910931 IconBar J@ @ y fillColor 222,219,214 cREVGeneral revUniqueID 1130384390612 testWidth )h u ( w cREVGeneral revUniqueID 1130385249087 Link 1 menu1 @ 9 DGIF89a9 ! , 9 ڋH扦ʞ ; cREVGeneral revUniqueID 1130389442729 2 menu2 @ 9 DGIF89a9 ! , 9 ڋH扦ʞ ; cREVGeneral revUniqueID 1130389445649 3 menu3 @ 9 DGIF89a9 ! , 9 ڋH扦ʞ ; cREVGeneral revUniqueID 1130389448638 4 menu4 @ 9 DGIF89a9 3 ! , 9 ڋH扦ʞ ; cREVGeneral revUniqueID 1130389451510 5 menu5 @ 9 DGIF89a9 ! , 9 ڋH扦ʞ ; cREVGeneral revUniqueID 1130389454373 6 tempSep K@ R 8 cREVGeneral revUniqueID 1130389917253 : togglePaletteMode A* on mouseUp if the mode of this stack is 1 then palette this stack else toplevel this stack end if end mouseUp @ cREVGeneral revUniqueID 1130391407748 ; vers on mouseUp if the shiftKey is down then ask "New Version:" with me if it is empty then exit mouseUp put it into me set the altVers of img "altPlug.png" to it end if end mouseUp + $ cREVGeneral revUniqueID 1130391510998 v0.12 > altPlug.png D altVers v0.12altOpenVisible truealtPlugFileName altMenuStack.rev altOnClickMe doIt altUpdateURL 8http://www.gadgetplugins.com/altplugins/altMenuStack.txt Menu Stack Builder PNG IHDR gAMA 7 tEXtSoftware Adobe ImageReadyqe<