/* Exclusion Editor - DMS - feb 98 - by Sylvain HUET */ /* Rev. 1.1 - Sep. '98 - by Marc BARILLEY */ typeof bmp=ObjBitmap;; typeof filebmp=S;; typeof first=ObjCheck;; typeof editWin= ObjWin ;; fun _paintE(a,b)= _BLTbitmap editWin bmp 225 5;; fun _OpenBmp(d,b,s)= let _PtoScol s -> name in if name==nil then nil else let _LDbitmap _channel s -> newbmp in if newbmp==nil then nil else let _GETbitmapSize newbmp -> [w h] in if w!=16 || h!=16 then (_DSbitmap newbmp; /* loc( _DLGMessageBox _channel editWin "Warning" ) */ _DLGMessageBox _channel editWin (_locEditor "210-ICONIF-warning" nil) /* loc( strcatn "The size of this bitmap <"::(itoa w)::"x"::(itoa h):: ) */ strcatn (_locEditor "220-ICONIF-thesizeoft" nil)::(itoa w)::(_locEditor "221-ICONIF-x" nil)::(itoa h):: /* loc( "> doesn't match"::nil 0;nil) ) */ (_locEditor "230-ICONIF->doesn'tma" nil)::nil 0;nil) else (_DSbitmap bmp; set bmp=newbmp; set filebmp=name; _paintE nil nil);; fun change(x,b)= _DLGrflopen (_DLGOpenFile _channel editWin nil nil "bitmap (*.bmp)\0*.BMP\0\0") @_OpenBmp b;; /* SCS editor */ fun load (l) = set filebmp=getInfo l "file"; _SETcheck first atoi getInfo l "first"; 0;; fun save (filename, n)= ("action"::"iconify"::nil):: ("action"::"uniconify"::nil):: ("file"::filebmp::nil):: ("first"::(itoa _GETcheck first)::nil):: nil;; fun IniEditor(s)= let startEditor _channel nil nil nil 315 30 WN_MENU EDITOR_NORMAL s "dms/tools/iconify/iconify.dmc" nil nil @load @save nil -> ed in ( set editWin = getEditWin ed; _CBwinPaint editWin @_paintE 0; /* loc( _CBbutton _CRbutton _channel editWin 5 5 100 20 0 "Change Bitmap" @change 0; ) */ _CBbutton _CRbutton _channel editWin 5 5 100 20 0 (_locEditor "580-ICONIF-changebitm" nil) @change 0; /* loc( set first=_CRcheck _channel editWin 110 5 100 20 0 "Iconify at starting"; ) */ set first=_CRcheck _channel editWin 110 5 100 20 0 (_locEditor "590-ICONIF-iconifyats" nil); if s==nil then nil else openDMI ed; _OpenBmp nil nil _checkpack filebmp; _paintE nil nil ); 0;;