/* Points Editor - DMS - Jul '98 - by Marc BARILLEY */ /* Rev. 1.1 - Sep. '98 - by Marc BARILLEY */ /* Rev. 2.5 - Mar. '99 - by Marc BARILLEY */ typeof left = ObjCheck;; typeof right = ObjCheck;; typeof same = ObjCheck;; fun load (l) = let atoi getInfo l "left" -> lft in if lft==1 then { _SETcheck left 1; _SETcheck right 0; } else { _SETcheck left 0; _SETcheck right 1; }; let atoi getInfo l "same" -> sm in if (sm==nil) || sm then _SETcheck same 1 else _SETcheck same 0; 0;; fun save (filename, n)= ("action"::"register"::"register"::nil):: ("action"::"unregister"::"unregister"::nil):: ("action"::"shuntLeft"::nil):: ("action"::"shuntRight"::nil):: ("action"::"toggle"::nil):: ("action"::"input"::nil):: ("event"::"left"::nil):: ("event"::"right"::nil):: ("event"::"registered"::"registered"::nil):: ("event"::"unregistered"::"unregistered"::nil):: ("left"::(itoa _GETcheck left)::nil):: ("same"::(itoa _GETcheck same)::nil):: nil;; fun IniEditor(s)= let startEditor _channel nil nil nil 315 50 WN_NORMAL EDITOR_NORMAL s "dms/tools/points/points.dmc" nil nil @load @save nil -> ed in let getEditWin ed -> editWin in ( _CRtext _channel editWin 5 10 60 20 ET_ALIGN_RIGHT (_locEditor "530-POINTS-initialsta" nil); set left = _SETcheck _CRcheck _channel editWin 70 5 80 20 CH_RADIO (_locEditor "540-POINTS-left" nil) 0; set right = _SETcheck _CRcheck _channel editWin 70 25 80 20 CH_RADIO (_locEditor "550-POINTS-right" nil) 1; set same = _SETcheck _CRcheck _channel editWin 145+5 5 160 20 0 (_locEditor "570-POINTS-sameforall" nil) 1; if s==nil then nil else openDMI ed ); 0;;