/* snapeedit.pkg : editeur du plugin quicktime - dec 99*/ /* Rev May 2000 by Vincent BEAUDENON*/ typeof plugin=S;; typeof class=S;; typeof ed = PluginEditor;; typeof InitURL = ObjText;; fun testinst(l,c)= if l==nil then 0 else let l->[a n] in if !strcmp a.classInst c then 1 else testinst n c;; proto save=fun [ [Inst r1] ] [[S r1] [S r1] [[S r1]r1] [[S r1]r1]];; fun openedit(win,param)= let strextr param -> l in let _GETwindowSizePosition win -> [w h x y] in ( set ed = startPluginEditor _channel win 0 0 w h WN_CHILDINSIDE|WN_NOBORDER class; _CRtext _channel ed.PluginEditorEditWin 5 5 110 20 ET_ALIGN_LEFT "Initial URL :"; set InitURL = _CReditLine _channel ed.PluginEditorEditWin 120 5 w-120 20 ET_ALIGN_LEFT|ET_DOWN getInfo l "init"; 0 );; fun closeedit()= strbuild let _GETtext InitURL -> s in if (strlen s)<1 then nil else ("init"::(s)::nil)::nil;; fun savesuppdmi(l)= if l==nil then nil /* supplemental Dmi */ else let l->[a n] in ("actionC"::(strcat a.nameInst ".play")::nil):: ("action"::(strcat a.nameInst ".playAll")::nil):: ("actionC"::(strcat a.nameInst ".stop")::nil):: ("action"::(strcat a.nameInst ".stopAll")::nil):: savesuppdmi n;; fun save(l)= [ nil /* registerF */ nil /* register */ ("plugin"::plugin::nil)::nil /* supplemental Dat */ savesuppdmi l /* supplemental Dmi */ ];; fun IniPlug(file)= set plugin=file; set class=getInfo strextr _getpack _checkpack file "name"; PlugRegister class @save nil @openedit @closeedit;;