home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d9xx / d922 / designer.lha / DesignerDemo / AllKindsDemo / AllKindsDemo.pas < prev    next >
Pascal/Delphi Source File  |  1993-10-07  |  1KB  |  52 lines

  1. { Simple Designer Demo }
  2.  
  3. Program ButtonDemo;
  4.  
  5. Uses exec,intuition,gadtools,graphics,amiga,diskfont,
  6.      workbench,utility,allkindsdemowin;
  7. var
  8.   done  : boolean;
  9.   class : long;
  10.   pimsg : pintuimessage;
  11.   dummy : long;
  12. begin
  13.   if openlibs then
  14.     begin
  15.       if makeimages then
  16.         begin
  17.           if openwindowdisplaywindow then
  18.             begin
  19.               done:=false;
  20.               repeat
  21.                 dummy:=wait(bitmask(displaywindow^.userport^.mp_sigbit));
  22.                 pimsg:=gt_getimsg(displaywindow^.userport);
  23.                 while(pimsg<>nil) do
  24.                   begin
  25.                     class:=pimsg^.class;
  26.                     gt_replyimsg(pimsg);
  27.                     case class of
  28.                       idcmp_closewindow : 
  29.                         done:=true;
  30.                       idcmp_refreshwindow :
  31.                         begin
  32.                           gt_beginrefresh(displaywindow);
  33.                           rendwindowdisplaywindow;
  34.                           gt_endrefresh(displaywindow,true);
  35.                         end;
  36.                      end;
  37.                     pimsg:=gt_getimsg(displaywindow^.userport);
  38.                   end;
  39.               until done;
  40.               closewindowdisplaywindow;
  41.             end
  42.            else
  43.             writeln('Could not open window.');
  44.           freeimages;
  45.         end
  46.        else
  47.         writeln('Could not make images.');
  48.       closelibs;
  49.     end
  50.    else
  51.     writeln('Could not open libraries.');
  52. end.