ô >!RunImage  ô (C) Martyn Fox  ô Wimp training program ( ô version 0.01 (date) 2" î … òclose:ö:ñ" at line ";ž:à <7 È™ "Wimp_Initialise",200,&4B534154,"Test" ¸ ,task% F òinit P òcreateicon Z õ d òpoll n ý quit% x òclose ‚ à Œ : – Ýòcreateicon  A ô creates the application's icon and puts it on the icon bar ª7 !b%=-1:b%!4=0:b%!8=0:b%!12=68:b%!16=68:b%!20=&3002 ´2 $(b%+24)="!Test":È™"Wimp_CreateIcon",,b% ¸ i% ¾ á È : Ò Ýòclose Ü- ô tells the Wimp to quit the application æ( È™ "Wimp_CloseDown",task%,&4B534154 ð á ú :  Ýòpoll % ô main program Wimp polling loop  È™ "Wimp_Poll",,b% ¸ r% " ÈŽ r% Ê ,# É 2:È™ "Wimp_OpenWindow",,b% 6$ É 3:È™ "Wimp_CloseWindow",,b% @ É 6:òmouseclick J É 17,18:òreceive T Ë ^ á h : r Ýòinit |0 ô initialisation before polling loop starts † Þ b% 1023 � quit%=£ š òcreate_window ¤ á ® : ¸ Ýòreceive ÂI ô handles messages received from the Wimp with reason codes 17 or 18 Ì ÈŽ b%!16 Ê Ö É 0:quit%=¹ à Ë ê á ô : þ Ýòmouseclick B ô handles mouse clicks in response to Wimp_Poll reason code 6 c ô b%!0=mousex,b%!4=mousey:b%!8=buttons:b%!12=window handle (-2 for icon bar):b%!16=icon handle  ÈŽ b%!12 Ê & É -2:ÈŽ b%!8 Ê 0 É 1:quit%=¹ :L É 4:!b%=main%:È™ "Wimp_GetWindowState",,b%:È™ "Wimp_OpenWindow",,b% D Ë N Ë X á b : l Ýòcreate_window v3 ô sets up window data block and creates window €& b%!0=168:ô visible area minimum x Š& b%!4=364:ô visible area minimum y ”& b%!8=804:ô visible area maximum x ž' b%!12=872:ô visible area maximum y ¨; b%!16=0:ô scroll x offset relative to work area origin ²; b%!20=0:ô scroll y offset relative to work area origin ¼L b%!24=-1:ô handle to open window behind (-1 means top, -2 means bottom) Æ# b%!28=&FF030012:ô window flags Ð7 b%?32=7:ô Title foreground and window frame colour Ú& b%?33=2:ô Title background colour ä* b%?34=7:ô Work area foreground colour î* b%?35=1:ô Work area background colour ø& b%?36=3:ô Scroll bar outer colour / b%?37=1:ô Scroll bar inner (slider) colour  8 b%?38=12:ô Title background colour when highlighted # b%?39=0:ô Reserved - must be 0  - b%!40=0:ô Work area minimum x coordinate *0 b%!44=-700:ô Work area minimum y coordinate 40 b%!48=1000:ô Work area maximum x coordinate >- b%!52=0:ô Work area maximum y coordinate H% b%!56=&3D:ô Title bar icon flags R6 b%!60=&3000::ô Work area flags giving button type \E b%!64=1:ô Sprite area control block pointer (1 for Wimp sprites) f1 b%!68=0:ô Minimum width and height of window p( $(b%+72)="Test Window":ô Title data z b%!84=0:ô Number of icons „' È™ "Wimp_CreateWindow",,b% ¸ main% Ž á ˜ : ÿ