home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 19 / AACD19.BIN / AACD / Programming / rxmui / examples / cr.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  2001-01-29  |  1.9 KB  |  86 lines

  1. /**/
  2.  
  3. signal on halt
  4. signal on break_c
  5.  
  6. l="rmh.library";if ~show("L",l) then;if ~addlib(l,0,-30) then exit
  7. if AddLibrary("rxmui.library")~=0 then exit
  8.  
  9. call createApp
  10. call SetNotifies
  11.  
  12. call set("win","open",1)
  13. call getattr("win","open","o")
  14. if o=0 then do
  15.     say "can't open window"
  16.     exit
  17. end
  18.  
  19. call handleApp
  20. exit
  21. /***********************************************************************/
  22. handleApp: procedure
  23. ctrl_c=2**12
  24. s=0
  25. do forever
  26.     call handle("APP","H",s)
  27.     do i=0 to h.num-1
  28.         if h.i="QUIT" then exit
  29.         say h.num-1 h.i
  30.     end
  31.     s=Wait(or(h.signals,ctrl_c))
  32.     if and(s,ctrl_c)>0 then exit
  33. end
  34. exit
  35. /***********************************************************************/
  36. err: procedure expose sigl rxmuierror
  37. parse arg res
  38. say sigl "["res"]"
  39.     say getrxmuistring(res) "in line" sigl-1 rxmuierror
  40.     exit
  41. /***********************************************************************/
  42. createApp: procedure
  43.     app.Title="Speedbar"
  44.     app.Version="$VER: Speedbar 1.0 (10.12.99)"
  45.     app.Copyright="©1999, alfie"
  46.     app.Author="alfie"
  47.     app.Description="Speedbar example"
  48.     app.Base="SPEEDBAR"
  49.     app.SubWindow="WIN"
  50.      win.ID="MAIN"
  51.      win.Title="Speedbar Example"
  52.      win.Contents="MGROUP"
  53.       mgroup.0="cra"
  54.         cra.class="crawling"
  55.         cra.background="textback"
  56.         cra.frame="text"
  57.         cra.FixHeightTxt="n"
  58.          cra.0="text"
  59.           text.class="text"
  60.           text.contents=ParseText("
  61. I am a timed scrolling\n
  62. virtual group\n
  63. \n
  64. Isn't it so wonderfull at all? :)\n
  65. \n
  66. RxMui is magic")
  67.  
  68.     res=NewObj("APPLICATION","APP")
  69.     if res~=0 then do
  70.         ioerr=IoErr()
  71.         say ioerr
  72.         call err(res)
  73.     end
  74.  
  75.     return
  76. /***********************************************************************/
  77. setNotifies: procedure
  78.     res=Notify("WIN","CLOSEREQUEST",1,"APP","RETURNID","QUIT")
  79.     if res~=0 then call err(res)
  80.     return
  81. /***********************************************************************/
  82. halt:
  83. break_c:
  84.     exit
  85. /**************************************************************************/
  86.