/* Authors: Arkeon */ /* Last update: 11.03.04 */ /* Version: 1.0 */ typeof plugin = S;; typeof class = S;; typeof SavedType = S;; typeof LBvecY = ObjText;; typeof vecY = ObjText;; typeof LBvecZ = ObjText;; typeof vecZ = ObjText;; typeof LBSpeed = ObjText;; typeof Speed = ObjText;; typeof Init = ObjCheck;; 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 LBvecY = _CRtext _channel win 5 30 80 20 ET_ALIGN_LEFT "Wavelength in cm : "; set vecY = _CReditLine _channel win 85 30 w-85 20 ET_ALIGN_LEFT|ET_DOWN let getInfo l "vecY" -> string in if (nil == string) then "256" else string; set LBvecZ = _CRtext _channel win 5 55 80 20 ET_ALIGN_LEFT "Amplitude in cm : "; set vecZ = _CReditLine _channel win 85 55 w-85 20 ET_ALIGN_LEFT|ET_DOWN let getInfo l "vecZ" -> string in if (nil == string) then "16" else string; set LBSpeed = _CRtext _channel win 5 80 80 20 ET_ALIGN_LEFT "Speed : "; set Speed = _CReditLine _channel win 85 80 w-85 20 ET_ALIGN_LEFT|ET_DOWN|ET_NUMBER let getInfo l "Speed" -> string in if (nil == string)||(atoi string)==0 then "100" else string; set Init = _SETcheck _CRcheck _channel win 5 105 70 20 0 "Init on" if !strcmpi getInfo l "init" "on" then 1 else 0; 0 ); 0;; fun closeedit() = strbuild ("vecY"::(if atoi(_GETtext vecY) then _GETtext vecY else "0")::nil):: ("vecZ"::(if atoi(_GETtext vecZ) then _GETtext vecZ else "0")::nil):: ("Speed"::(if atoi(_GETtext Speed) then _GETtext Speed else "100")::nil):: ("init"::(let _GETcheck Init -> x in if x then "on" else "off")::nil)::nil ;; fun savesuppdmi(l) = if l==nil then nil else let l->[a n] in ("actionC"::(strcat a.nameInst ".start")::nil):: ("actionC"::(strcat a.nameInst ".stop")::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;;