home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 22 / AACD 22.iso / AACD / Programming / RxMUI / Examples / cy.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  2001-05-24  |  1.5 KB  |  62 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. call RxMUIOpt("DebugMode ShowErr")
  9.  
  10. call createApp
  11. call handleApp
  12.  
  13. /* never reached */
  14. /***********************************************************************/
  15. handleApp: procedure
  16.     ctrl_c=2**12
  17.     do forever
  18.         call NewHandle("APP","H",ctrl_c)
  19.         if and(h.signals,ctrl_c)>0 then exit
  20.         if h.event="QUIT" then exit
  21.         else interpret h.event
  22.     end
  23.     /* never reached */
  24. /***********************************************************************/
  25. createApp: procedure
  26.  
  27.     win.ID="MAIN"
  28.     win.Title="CompactWindow Example"
  29.     win.NOGADGETS=1
  30.     win.SIZEGADGET=0
  31.     win.Contents="MGROUP"
  32.      mgroup.0="cy"
  33.       cy.class="cycle"
  34.       cy.entries="uno|due|tre"
  35.     res=NewObj("compactwindow","win")
  36.     if res~=0 then exit
  37.  
  38.     app.Title="CompactWindow"
  39.     app.Version="$VER: CompactWindow 1.0 (10.12.99)"
  40.     app.Copyright="©1999, alfie"
  41.     app.Author="alfie"
  42.     app.Description="CompactWindow example"
  43.     app.Base="RXMUIEXAMPLE"
  44.     app.SubWindow="WIN"
  45.     res=NewObj("APPLICATION","APP")
  46.     if res~=0 then exit
  47.  
  48.     call Notify("WIN","CLOSEREQUEST",1,"APP","RETURNID","QUIT")
  49.  
  50.     call set("win","open",1)
  51.     if ~xget("win","open") then do
  52.         say "can't open window"
  53.         exit
  54.     end
  55.  
  56.     return
  57. /***********************************************************************/
  58. halt:
  59. break_c:
  60.     exit
  61. /**************************************************************************/
  62.