ãã Copyright (c) 1990-2008 Morgan Stanley All rights reserved. ãã See .../src/LICENSE for terms of distribution. $cx sst define{cx}: { WSûs.autows{()}; (cx%`_MODE)û0; (cx%`_CURROW)û0; (cx%`_LIST)û(); (cx,`_LIST) _scb (set_list;); (cx%`_DIRECTIONS)û'èç'; (cx%`_SORT)û0; (cxÖ`_SORT) _scb (set_sort;); (cx%`_INDEX)û1; cxâ'_L:(~nÅsst.absolute{_R})/n Ý nûÉ#_LIST'; (cx%`_R)ûÉ0; (cx%`_LL)û(del_l;1 0); (cx%`_RR)û<{del_r}; (cx%`_TSORT)û<{tsort}; cxâ'_LEFT:_L#_LIST'; cxâ'_RIGHT:sst.right{`',(Îcx),'} Ý _R'; cxâ'_UPDOWN:sst.sortspec{`',(Îcx),'} Ý _RIGHT Ý _DIRECTIONS'; (cx%`_LLL)û(del_l;¢1 ¢1); (cx%`_SST)û(`_LL `_RR;`_L `_R); (cx,`_L) .is `array; (cx,`_R) .is `array; (cx,`_LL) .is `button; (cx,`_RR) .is `button; (cx,`_SST) .is `layout; (cx,`_LLL) .is `button; (cx,`_TSORT) .is `button; (cx,`_L) .has (`title;'';`rows;5;`space;10;`out;(out_lr;0);`delete;(del_l;1 0);`protect;1;`rowsep;0); (cx,`_R) .has (`title;'';`rows;5;`space;10;`out;(out_lr;1);`delete;del_r;`refer;ref_r;`select;sel_r;`protect;1;`rowsep;0); (cx,`_LL) .has (`title;'>>';`acceptfocus;0); (cx,`_RR) .has (`title;'<<';`acceptfocus;0); (cx,`_LLL) .has (`title;'ç';`acceptfocus;0); (cx,`_TSORT) .has (`title;'è ûý ç';`acceptfocus;0); (cx,`_SST) .has (`title;'';`C;1;`reshow;0); s.autows{WS}; cxÖ`_SST } set_list{s;d;i;p;c;v}: { spûif (()½d) 10 else 10Ó(c%`_SORT)+1#Òif (`sym=©d) Îd else d; nû#d; (c%`_R)ûÉ0; (c,`_L) .has (`space;sp;`rowsep;n); (c,`_R) .has (`space;sp;`rowsep;n); } sortspec{c}:if (1=c%`_SORT) _alsf{Øupdown¡{c%`_RIGHT;¡((r<0)#c%`_DIRECTIONS),¡Î¡z set_sort{s;d;i;p;c;v}: { (c,`_SST) .has (`freeze;1); (c%`_SST)ûif (d½0) (`_LL `_RR;`_L `_R) else 2 4Ò`_LL `_LLL `_RR `_TSORT `_L `_L `_R `_R; (c,`_LLL) .has (`show;d); (c,`_TSORT) .has (`show;d); (c,`_LL) .has (`title;dØ('>>';'è')); (c%`_R)ûc%`_R; (c,`_SST) .has (`naturalsize;1;`freeze;0); } empty_r{c}:if (0=#c%`_L) (c,`_R) .has (`focus;1) empty_l{c}:if (0<#c%`_R) index_r{c} else (c,`_L) .has (`focus;1) Ý (c,`_R) .has (`index;É0) index_r{c}:if (0<#i Ý iû0Ø`index .of c,`_R) if (n¤i Ý nû#c%`_R) (c,`_R) .has (`index;¢1+n) row_r_if{c}:if (0=#0Ø`index .of c,`_R) row_r{c} row_r{c}:(c,`_R) .has (`row;¢1+#c%`_R) row_l{c;n}:(c,`_L) .has (`row;(c%`_L)Én) adjust{c;v;r;i}:if ((^/(#d)>r,i)^(^/0¤r,i)^1<#d Ý dûc%v) (()#c%v)ût Ý ((~b)/t)ûi#d Ý tûb\t Ý tû(k¨i)/d Ý bûk¨r Ý kûÉ#d del_l{s;c;v}:if (¢1`row .of c,v; if(1=(c%`_MODE)) adjust{c;v;r;c%`_CURROW}; (c%`_CURROW)ûr; } ref_r{s;c;v}: { if (0=c%`_MODE) {(c%`_MODE)û1; (c,v) .has (`selectbg;`pink)} else {(c%`_MODE)û0; (c,v) .has (`selectbg; `grey)}; } out_lr{s;d;i;p;c;v}:if (e¦#cs Ý eûabsolute{d} Ý csûc%`_LIST) '' else (if (s) direction_r{c;d}),if (`char=©zûe#cs) z else Îz