#!/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 "$@" B Managing Titlebars 2" Q/* Decorations Stack By Eric Chatonet 3/6/05 http://www.sosmartsoftware.com/ */ Managing Titlebars U Lucida Grande U Lucida Grande W Lucida Grande W Lucida Grande W Courier U Courier U Courier U Courier AU Lucida Grande @U Lucida Grande Pulldown Menu cREVGeneral scriptChecksum 9pAu69Q debugObjects breakPoints handlerList scriptSelection char 42 to 41 bookmarks tempScript prevHandler commandKeyDownscript a
/*
Decorations Stack
By Eric Chatonet
3/6/05
http://www.sosmartsoftware.com/
*/
Pon preOpenStack set the style of this stack to modeless set the loc of this stack to the screenLoc end preOpenStack ------------------------------------ on UpdateDecorations local tNum,tDecorationsList ----- put 0 into tNum repeat with i = 1064 to 1066 if the hilite of btn ID i and the enabled of btn ID i then put the short name of btn ID i & comma after tDecorationsList add 1 to tNum end if end repeat delete last char of tDecorationsList set the decorations of this stack to "title," & tDecorationsList if tDecorationsList <> empty then if tNum = 3 then put "set the decorations of this stack to default" into fld "Deco" else put "set the decorations of this stack to" && quote & "title,menu," & tDecorationsList & quote into fld "Deco" else put "set the decorations of this stack to" && quote & "title,menu" & quote into fld "Deco" end if select text of fld "Deco" end UpdateDecorations cREVGeneral scriptChecksum V(+LIN\ɘ bookmarks breakPoints handlerList preOpenStack UpdateDecorationsscriptSelection char 16 to 15prevHandler preOpenStacktempScripton preOpenStack
set the style of this stack to modeless
set the loc of this stack to the screenLoc
end preOpenStack
------------------------------------
on UpdateDecorations
local tNum,tDecorationsList
-----
put 0 into tNum
repeat with i = 1064 to 1066
if the hilite of btn ID i and the enabled of btn ID i then
put the short name of btn ID i & comma after tDecorationsList
add 1 to tNum
end if
end repeat
delete last char of tDecorationsList
set the decorations of this stack to "title," & tDecorationsList
if tDecorationsList <> empty then
if tNum = 3 then put "set the decorations of this stack to default" into fld "Deco"
else put "set the decorations of this stack to" && quote & "title,menu," & tDecorationsList & quote into fld "Deco"
else
put "set the decorations of this stack to" && quote & "title,menu" & quote into fld "Deco"
end if
select text of fld "Deco"
end UpdateDecorations
scripton preOpenStack
set the style of this stack to modeless
set the loc of this stack to the screenLoc
end preOpenStack
------------------------------------
on UpdateDecorations
local tNum,tDecorationsList
-----
put 0 into tNum
repeat with i = 1064 to 1066
if the hilite of btn ID i and the enabled of btn ID i then
put the short name of btn ID i & comma after tDecorationsList
add 1 to tNum
end if
end repeat
delete last char of tDecorationsList
set the decorations of this stack to "title," & tDecorationsList
if tDecorationsList <> empty then
if tNum = 3 then put "set the decorations of this stack to default" into fld "Deco"
else put "set the decorations of this stack to" && quote & "title,menu," & tDecorationsList & quote into fld "Deco"
else
put "set the decorations of this stack to" && quote & "title,menu" & quote into fld "Deco"
end if
select text of fld "Deco"
end UpdateDecorations
@ 0 6 > ? A BlackCheckmark.png PNG IHDR pHYs gAMA |Q cHRM z% u0 ` : o_F xIDATxb` 17 R@L:̤/@,0@ 1I +x%@ Lħ HW ť $@PIV dĊK8 0 6 IENDB` cREVGeneral revUniqueID 1109347801497 0 Deco )p qon enterInField do target end enterInField ------------------- on returnInField do target end returnInField @ cREVGeneral scriptChecksum Zlvgd,=j bookmarks revUniqueID 1109849448492handlerList enterInField returnInFieldscriptSelection char 112 to 111prevHandler enterKeytempScript scripton enterInField
do target
end enterInField
-------------------
on returnInField
do target
end returnInField
Aset the decorations of this stack to "title,menu,minimize,close" 6 ,i0Ion mouseUp local tStyle ----- put the short name of the target into tStyle if the style of this stack <> tStyle then set the style of this stack to tStyle if the enabled of grp "CheckBoxes" then set the enabled of btn "Minimize" to tStyle <> "palette" UpdateDecorations -- C select text of fld "Deco" end mouseUp . n | Window Style cREVGeneral scriptChecksum rw?1GAu\0trevUniqueID 1109856297295 bookmarks handlerList mouseUptempScript prevHandler mouseUpscriptSelection char 266 to 265script Don mouseUp
local tStyle
-----
put the short name of the target into tStyle
if the style of this stack <> tStyle then set the style of this stack to tStyle
if the enabled of grp "CheckBoxes" then set the enabled of btn "Minimize" to tStyle <> "palette"
UpdateDecorations -- C
select text of fld "Deco"
end mouseUp
4 topLevel `d " [ R TopLevel cREVGeneral revUniqueID 1109856284783 5 palette `d " r R Palette cREVGeneral bookmarks revUniqueID 1109856285697handlerList mouseUpprevHandler tempScript script > ,i0on mouseUp local tNum ----- put the hilitedButton of me into tNum switch tNum case 1 disable grp "CheckBoxes" set the decorations of this stack to empty put "set the decorations of this stack to empty" into fld "Deco" break case 2 enable grp "CheckBoxes" UpdateDecorations -- C end switch if tNum = 2 then set the enabled of btn "Minimize" to the style of this stack <> "palette" select text of fld "Deco" end mouseUp .; | Title Bar Style cREVGeneral scriptChecksum ۽Vٜ+O.revUniqueID 1109857369930 bookmarks handlerList mouseUptempScript prevHandler mouseUpscriptSelection char 329 to 328script ;on mouseUp
local tNum
-----
put the hilitedButton of me into tNum
switch tNum
case 1
disable grp "CheckBoxes"
set the decorations of this stack to empty
put "set the decorations of this stack to empty" into fld "Deco"
break
case 2
enable grp "CheckBoxes"
UpdateDecorations -- C
end switch
if tNum = 2 then set the enabled of btn "Minimize" to the style of this stack <> "palette"
select text of fld "Deco"
end mouseUp
; Without Title Bar hD G v cREVGeneral revUniqueID 1109857161985 = hd = G Title Bar with: cREVGeneral bookmarks revUniqueID 1109857211709handlerList mouseUpprevHandler tempScript script Info p on linkClicked pLink lock screen go stack "revDocs" if revAppVersion() = 2.5 then put pLink into fld "Find" set the menuhistory of btn "Filter type" to 1 send "mouseUp" to btn "Go" end if end linkClicked cREVGeneral scriptChecksum b|"A"SrevUniqueID 1109350253372 bookmarks handlerList linkClickedtempScript prevHandler linkClickedscriptSelection char 225 to 224scripton linkClicked pLink
lock screen
go stack "revDocs"
if revAppVersion() = 2.5 then
put pLink into fld "Find"
set the menuhistory of btn "Filter type" to 1
send "mouseUp" to btn "Go"
end if
end linkClicked
#How-To stack #009 by Eric Chatonet @ " 3/3/05 Initial release @ @ 1606 75/10/05 Consideration of Revolution2.5.1 enhancements @ 1606 . B5/30/05 Miscellaneous changes for Tutorials Picker compatibility @ 1606 9 QThis stack shows all the different title bars a window can display with Rev 2.x. @ P Enjoy! @ With Rev versions prior to 2.5.1, the Stack Property Inspector dialog lets you choose between 4 sets of title bar controls (with wrong illustrations :-) but 4 interesting combinations are absent (close box only for instance). Then you will have a better control by scripting! @ 1600 " @ # 2With Rev 2.5.1, all options are now available :-) @ 1 @ The menu keyword affects the visible of the menus on Windows and Unix. Then if you remove this keyword from the code, the menu bar will not be shown on Windows and Unix (ignored on Mac OS). @ 1600 Other keywords that affect the window appearance can be included as system (Mac OS X, Unix and Windows only), noShadow (Mac OS X only) and metal (Mac OS X only). @ 1600 E F L $ p x P Paste the code into the message box and apply it to the stack of your choice. @ 1600 G H 7See decorations property in the docs for more details. ' B ` SSS.png Hon mouseDown revGoUrl "http://www.sosmartsoftware.com" end mouseDown " -PNG IHDR " . pHYs .# .#x?v 9iCCPPhotoshop ICC profile xڝwTTϽwz0z.0. Qf Ml@DEHb!(`HPb0dFJ|yyǽgs{. $O./ 'z8WGб x 0Y驾A@$/7z HeOOҬT _lN:K"N3"$F/JPrb[䥟}Qd[Sl1x{#bG\NoX3I[ql2 $8xtr p/8pCfq.Knjm͠{r28?.)ɩL^6 g,qm"[Z[Z~Q7%" 3R `̊j[~ : w! $E}kyhyRm333: }=#vʉe tqX)I)B>== <8Xȉ9