/* module showIpip - part editor */ /* by iri - version 2.0 - 01/2004 */ /* rev 2.1 by iri - version 2.1 - 03/2004 */ typeof editWin = ObjWin;; typeof pathAide = ObjText;; typeof pathOk = ObjText;; typeof bmpAide = S;; typeof bmpOk = S;; fun _OpenBmp(d,b,s)= let _PtoScol s -> name in if name==nil then nil else if b then (set bmpAide = name; _SETtext pathAide name) else if !b then (set bmpOk = name; _SETtext pathOk name) else nil; 0;; fun cbOk(a, b)= _DLGrflopen (_DLGOpenFile _channel editWin bmpOk nil "bitmap (*.jpg)\0*.JPG\0\0") @_OpenBmp 0;; fun cbAide(a, b)= _DLGrflopen (_DLGOpenFile _channel editWin bmpAide nil "bitmap (*.jpg)\0*.JPG\0\0") @_OpenBmp 1;; fun cbLoad(l)= set bmpAide = getInfo l "bmpAide"; if bmpAide == nil then _SETtext pathAide "Dms/tools/showip/help.jpg" else _SETtext pathAide bmpAide; set bmpOk = getInfo l "bmpOk"; if bmpOk == nil then _SETtext pathOk "Dms/tools/showip/ok.jpg" else _SETtext pathOk bmpOk; 0;; fun cbSave (filename, n) = let (_GETtext pathAide)::(_GETtext pathOk)::nil -> l in ("registerF"::l):: ("event"::"shutdown"::nil):: ("event"::"msg"::nil):: ("zone"::"ip"::nil):: ("bmpAide"::bmpAide::nil):: ("bmpOk"::bmpOk::nil):: nil;; fun IniEditor(s)= let [315 60] -> [w h] in let startEditor _channel nil nil nil w h WN_MENU EDITOR_NORMAL s "dms/tools/showip/showip.dmc" nil nil @cbLoad @cbSave nil -> ed in ( set editWin = getEditWin ed; _CBbutton _CRbutton _channel editWin 5 5 80 20 0 "Help" @cbAide 0; set pathAide = _CRtext _channel editWin 90 5 w-90 20 ET_AHSCROLL|ET_DOWN if bmpAide == nil then "Dms/tools/showip/help.jpg" else bmpAide; _CBbutton _CRbutton _channel editWin 5 30 80 20 0 "Ok" @cbOk 0; set pathOk = _CRtext _channel editWin 90 30 w-90 20 ET_AHSCROLL|ET_DOWN if bmpOk == nil then "Dms/tools/showip/ok.jpg" else bmpOk; if s==nil then nil else openDMI ed ); 0;;