home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d9xx
/
d922
/
designer.lha
/
DesignerDemo
/
ButtonDemo
/
ButtonDemo.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-10-07
|
1KB
|
51 lines
{ Simple Designer Demo }
Program ButtonDemo;
Uses exec,intuition,gadtools,graphics,amiga,diskfont,
workbench,utility,buttondemowin;
var
done : boolean;
class : long;
pimsg : pintuimessage;
dummy : long;
pgsel : pgadget;
begin
if openlibs then
begin
if openwindowdisplaywindow then
begin
done:=false;
repeat
dummy:=wait(bitmask(displaywindow^.userport^.mp_sigbit));
pimsg:=gt_getimsg(displaywindow^.userport);
while(pimsg<>nil) do
begin
class:=pimsg^.class;
pgsel:=pgadget(pimsg^.iaddress); { do not reference unless gadgetup or gadgetdown }
gt_replyimsg(pimsg);
case class of
idcmp_closewindow :
done:=true;
idcmp_gadgetup :
begin
case pgsel^.gadgetid of
okbutton :
done:=true;
cancelbutton :
done:=true;
end;
end;
end;
pimsg:=gt_getimsg(displaywindow^.userport);
end;
until done;
closewindowdisplaywindow;
end
else
writeln('Could not open window.');
closelibs;
end
else
writeln('Could not open libraries.');
end.