/* Random Editor - DMS - feb 98 - by Sylvain HUET */ /* Rev. 1.1 - Sep. '98 - by Marc BARILLEY */ typeof nb=ObjText;; /* SCS editor */ fun load (l) = _SETtext nb getInfo l "scale"; 0;; fun getrandom(n)= if n==nil || n<=0 then nil else ("event"::(strcat "random" itoa n)::nil)::getrandom n-1;; fun save (filename, n)= let atoi _GETtext nb -> p in ("action"::"input"::nil):: ("scale"::(itoa p)::nil):: getrandom p;; fun rflSizeEditWin (wn, blurp, w, h)= _SIZEtext nb w-115 20 110 5;; fun IniEditor(s)= let [315 30] -> [w h] in let startEditor _channel nil nil nil w h WN_MENU EDITOR_NORMAL s "dms/tools/random/random.dmc" nil nil @load @save nil -> ed in let getEditWin ed -> editWin in ( _CBwinSize editWin @rflSizeEditWin 0; /* loc( _CRtext _channel editWin 5 5 90 20 ET_ALIGN_LEFT "Scale :"; ) */ _CRtext _channel editWin 5 5 90 20 ET_ALIGN_LEFT (_locEditor "330-RANDOM-scale:" nil); set nb=_CReditLine _channel editWin 110 5 w-115 20 ET_NUMBER|ET_DOWN ""; if s==nil then nil else openDMI ed ); 0;;