/* editeur de plugin standard */ typeof plugin=S;; typeof class=S;; typeof ed = PluginEditor;; typeof U1 = ObjText;; typeof V1 = ObjText;; /*typeof initab = ObjText;;*/ 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 80 20 ET_ALIGN_LEFT "U : "; set U1 = _CReditLine _channel ed.PluginEditorEditWin 85 5 100 20 ET_ALIGN_LEFT|ET_DOWN|ET_NUMBER let getInfo l "ray1" -> string in if (nil == string) then "20" else string; _CRtext _channel ed.PluginEditorEditWin 5 30 80 20 ET_ALIGN_LEFT "V : "; set V1 = _CReditLine _channel ed.PluginEditorEditWin 85 30 100 20 ET_ALIGN_LEFT|ET_DOWN|ET_NUMBER let getInfo l "ray2" -> string in if (nil == string) then "15" else string; /* _CRtext _channel ed.PluginEditorEditWin 5 55 80 20 ET_ALIGN_LEFT "initab : "; set initab = _CReditLine _channel ed.PluginEditorEditWin 85 55 100 20 ET_ALIGN_LEFT|ET_DOWN|ET_NUMBER let getInfo l "initab" -> string in if (nil == string) then "64" else string; */ 0 ) ;; fun closeedit() = strbuild ("ray1"::(_GETtext U1)::nil):: ("ray2"::(_GETtext V1)::nil):: /*("initab"::(_GETtext initab)::nil)::*/ nil ;; 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 save(l)= if l==nil then [nil nil nil nil] else [ nil /* registerF */ nil /* register */ ("plugin"::plugin::nil)::nil /* supplemental Dat */ nil /* supplemental Dmi */ ] ;; fun IniPlug(file) = set plugin=file; set class=getInfo strextr _getpack _checkpack file "name"; PlugRegister class @save nil @openedit @closeedit ;;