/* Passwd window Editor - DMS - mar 98 - by Sylvain HUET */ struct BannerW=[chBW:Chn,winBW:ObjWin,txtsBW:[[ObjText ObjText] r1], endBW:fun[S] I ]mkBW;; fun setbw(b,l,q)= if l==nil then 0 else let l->[[p _] n] in (_SETtext p hd tl hd q; setbw b n tl q);; fun setBW(b,b0)= setbw b b.txtsBW strextr b0;; fun getbw(l)= if l==nil then nil else let l->[[p q] n] in ("*"::(_GETtext p)::(_GETtext q)::nil)::getbw n;; fun getBW(b)= strbuild getbw b.txtsBW;; fun oneban(i,b)= _CRtext b.chBW b.winBW 5 30+i*25 10 20 ET_ALIGN_CENTER itoa i; [_CReditLine b.chBW b.winBW 20 30+i*25 190 20 ET_DOWN+ET_AHSCROLL "" _CReditLine b.chBW b.winBW 215 30+i*25 95 20 ET_PASSWORD+ET_DOWN+ET_AHSCROLL "" ];; fun _destroyE(a,b)= exec b.endBW with [nil];; fun _ok(a,b)= let getBW b -> s in (_DSwindow b.winBW; exec b.endBW with [s]);; fun _cancel(a,b)= _DSwindow b.winBW; exec b.endBW with [nil];; fun iniBW(ch,father,x,y,w,h,mess,end,b0,flag)= let _CRwindow ch father x y w h if flag then WN_CHILDINSIDE|WN_NOCAPTION|WN_NOBORDER else WN_MENU+WN_MINBOX+WN_SIZEBOX mess -> win in let mkBW [ch win nil end]-> b in (set b.txtsBW=tabtolist create_tab 8 @oneban b; _CRtext _channel win 20 5 190 20 ET_ALIGN_CENTER (_loc this "PASS_PROMPT" nil); _CRtext _channel win 215 5 95 20 ET_ALIGN_CENTER (_loc this "PASS_TITLE" nil); _CBwinDestroy win @_destroyE b; _CBbutton _CRbutton ch win 5 235 60 20 0 (_loc this "PASS_OK" nil) @_ok b; _CBbutton _CRbutton ch win 70 235 60 20 0 (_loc this "PASS_CANCEL" nil) @_cancel b; setBW b b0; b) ;; fun delBW(b)=_DSwindow b.winBW;;