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

  1. /* Bitmap example */
  2.  
  3. signal on halt
  4. signal on break_c
  5.  
  6. call Init
  7. call CreateApp
  8. call HandleApp
  9. /* never reached */
  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.     call ProgDir()
  16.     return
  17. /***********************************************************************/
  18. HandleApp: procedure
  19.     ctrl_c=2**12
  20.     do forever
  21.         call NewHandle("app","h",ctrl_c)
  22.         if and(h.signals,ctrl_c)>0 then exit
  23.         select
  24.             when h.event="QUIT" then exit
  25.             otherwise interpret h.event
  26.         end
  27.     end
  28.     /* never reached */
  29. /***********************************************************************/
  30. CreateApp: procedure
  31.  
  32.     app.Title="BitmapExample"
  33.     app.Version="$VER: BitmapExample 1.1 (25.1.2002)"
  34.     app.Copyright="©2002, alfie"
  35.     app.Author="alfie"
  36.     app.Description="BitmapExample"
  37.     app.Base="RXMUIEXAMPLE"
  38.     app.SubWindow="win"
  39.      win.ID="bitm"
  40.      win.Title="BitmapExample"
  41.      win.Contents="MGROUP"
  42.  
  43.       mgroup.0=vspace()
  44.       mgroup.1="gg"
  45.        gg.class="group"
  46.        gg.horiz=1
  47.         gg.0=hspace()
  48.         gg.1="bm"
  49.          bm.class="bitmap"
  50.          bm.file="PROGDIR:pics/Trek"
  51.          bm.inputmode="relverify"
  52.          bm.frame="button"
  53.         gg.2=hspace()
  54.       mgroup.2=vspace()
  55.  
  56.     if NewObj("APPLICATION","APP")>0 then exit
  57.  
  58.     call Notify("win","CloseRequest",1,"app","ReturnID","quit")
  59.     call Notify("bm","pressed",0,"app","return","say 'bm pressed'")
  60.  
  61.     call set("win","Open",1)
  62.  
  63.     return
  64. /***********************************************************************/
  65. halt:
  66. break_c:
  67.     exit
  68. /**************************************************************************/
  69.