ãã Copyright (c) 1990-2008 Morgan Stanley All rights reserved. ãã See .../src/LICENSE for terms of distribution. $cx zgl set_geometry{s;d;i;p;c;v}: { (c,`_OBJECTS) .has (`freeze;1); pû,c%`_OBJECTS; (iûc%`_ROWS) do (jûc%`_COLS) do if (0<#p) pû1Õp Ý p[0] .has (`at;i,j,1 1); (c,`_OBJECTS) .has (`freeze;0); } flip{s;c;v}: { (c%`_ZOOMED)ûz#o Ý zû(#o)|s+n Ý nûoÉc%`_ZOOMED Ý oû,cÖc%`_OBJECTS; (c%`_ZOOMED) .has `raise; } set_zoom{s;d;i;p;c;v}: { case (`ZoomØc%v) { 0; { (c,`_ROWS) .has (`protect;0); (c,`_COLS) .has (`protect;0); (c,`_FLIPF) .has (`protect;1); (c,`_FLIPB) .has (`protect;1); (c%`_ROWS)ûc%`_ROWS; (c%`_ZOOMED)û(); }; 1; { (c,`_ROWS) .has (`protect;1); (c,`_COLS) .has (`protect;1); (c,`_FLIPF) .has (`protect;0); (c,`_FLIPB) .has (`protect;0); if (0<#o Ý oû,cÖc%`_OBJECTS) { (c,`_OBJECTS) .has (`freeze;1); o .has¡<(`at;0 0 1 1); fcû0Ø`focus .of c,`_OBJECTS; (c%`_ZOOMED)ûif (0=#fc) cÖ0#o else if (fcÅcÖo) fc else cÖ0#o; (c%`_ZOOMED) .has `raise; (c,`_OBJECTS) .has (`freeze;0); } } } } define{cx}: { WSûs.autows{()}; (cx%`_ZOOM)û(,`Zoom;,<0); (cx%`_ZOOMED)û(); (cx%`_FLIPF)û(flip;1); (cx%`_FLIPB)û(flip;¢1); (cx%`_ROWS)û1; (cx%`_COLS)û1; cxâ'_ROWS:1ÓÓ(#_OBJECTS)ß_COLS'; cxâ'_COLS:1ÓÓ(#_OBJECTS)ß_ROWS'; (cx%`_OBJECTS)û(); (cx%`_ROWS_COLS)û<`_ROWS `_COLS; (cx%`_ZGL)û(`_ZOOM `_ROWS_COLS;`_OBJECTS;`_FLIPF `_FLIPB); (cx,`_ZOOM) .is `check; (cx,`_FLIPF) .is `button; (cx,`_FLIPB) .is `button; (cx,`_ROWS) .is `scalar; (cx,`_COLS) .is `scalar; (cx,`_OBJECTS) .is `layout; (cx,`_ROWS_COLS) .is `layout; (cx,`_ZGL) .is `layout; (cx,`_ZOOM) .has (`title;'';`acceptfocus;0;`set;set_zoom;`resize;'Wl'); (cx,`_FLIPF) .has (`title;'Flip +';`acceptfocus;0;`protect;1); (cx,`_FLIPB) .has (`title;'Flip -';`acceptfocus;0;`protect;1); (cx,`_ROWS_COLS) .has (`title;'';`resize;'Wr'); (cx,`_ROWS) .has (`title;'Rows';`space;5;`set;set_geometry); (cx,`_COLS) .has (`title;'Cols';`space;5;`set;set_geometry); (cx,`_OBJECTS) .has (`newshow;1;`locksize;1;`title;'';`reparent;0); (cx,`_ZGL) .has (`title;'';`C;1); s.autows{WS}; cxÖ`_ZGL }