home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #2 / Amiga Plus CD - 2004 - No. 02.iso / AmigaPlus / Tools / Development / RxMUI / Examples / Busy.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  2004-01-31  |  1.5 KB  |  53 lines

  1. /* Busy bar example */
  2.  
  3. signal on halt
  4. signal on break_c
  5.  
  6. call Init
  7. call CreateApp
  8. call HandleApp
  9.  
  10. /***********************************************************************/
  11. Init: procedure
  12.     l="rmh.library";if ~show("L",l) then;if ~addlib(l,0,-30) then exit
  13.     if AddLibrary("rexxsupport.library","rxmui.library")~=0 then exit
  14.     call RxMUIOpt("DebugMode ShowErr")
  15.     return
  16. /***********************************************************************/
  17. HandleApp: procedure
  18.     ctrl_c=2**12
  19.     do forever
  20.         call NewHandle("app","h",ctrl_c)
  21.         if and(h.signals,ctrl_c)>0 then exit
  22.         select
  23.             when h.event="QUIT" then exit
  24.             otherwise interpret h.event
  25.         end
  26.     end
  27.     /* never reached */
  28. /***********************************************************************/
  29. CreateApp: procedure
  30.     app.Title="Busybar"
  31.     app.Version="$VER: Busybar 1.2 (25.1.2002)"
  32.     app.Copyright="Copyright © 2002 by Alfonso Ranieri"
  33.     app.Author="Alfonso Ranieri"
  34.     app.Description="Busybar example"
  35.     app.Base="RXMUIEXAMPLE"
  36.     app.SubWindow="WIN"
  37.      win.ID="busy"
  38.      win.Title="Busybar Example"
  39.      win.Contents="MGROUP"
  40.       mgroup.0=MakeObj(,"Busy")
  41.  
  42.     if NewObj("APPLICATION","APP")>0 then exit
  43.  
  44.     call set("win","open",1)
  45.  
  46.     call Notify("WIN","CLOSEREQUEST",1,"APP","RETURNID","QUIT")
  47.     return
  48. /***********************************************************************/
  49. halt:
  50. break_c:
  51.     exit
  52. /**************************************************************************/
  53.