/* iriTerm Client ** ver. 1.0 ** nov. 02 */ /* by iri ** iri@fr.st */ /* revised by iri ** ver 1.1 ** dec.02 */ /* to do : focus after initTxt and not pos 0 */ typeof initTxt=S;; fun _end(s)= _DMSdelete this;; fun _end2(a,b)=_DMSdelete this;; fun _resize(a, t, x, y)=_SIZEtext t x-2 y-2 1 1;; fun envoi(a,msg)= let _GETtext msg -> txt in if !(strcmp txt "") then 0 else _DMSevent this "sendmsg" txt nil; _SETtext msg initTxt; _SETtextFocus msg /*_showconsole; _fooS initTxt */ ;; fun IniDMI(param)= set initTxt = param; let _DMSgetZone this "saisie" @_end nil @_end ->[fen x y w h] in let if fen!=nil then _CRwindow _channel fen x y w h WN_CHILDINSIDE|WN_NOCAPTION "" else _CRwindow _channel DMSwin x y w h WN_NOBORDER | WN_MENU _loc this "TITLE" nil -> win in let _CReditLine _channel win 1 1 w-50 h-2 ET_DOWN | ET_AHSCROLL initTxt -> text in ( _CBwinDestroy win @_end2 nil; _CBwinSize win @_resize text; _CBbutton (_CRbutton _channel win w-50 1 50 h-2 0 _loc this "OK_ITEM" nil) @envoi text; _SETtextFocus text; );;