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

  1. /* Wheel.mcc example */
  2.  
  3. call rxmuiopt("debugmode showerr")
  4.  
  5. signal on halt
  6. signal on break_c
  7.  
  8. l="rmh.library";if ~show("L",l) then;if ~addlib(l,0,-30) then exit
  9. if AddLibrary("rxmui.library")~=0 then exit
  10.  
  11. call createApp
  12. call handleApp
  13.  
  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.     select
  21.         when h.event="QUIT" then exit
  22.         otherwise interpret h.event
  23.     end
  24. end
  25. exit
  26. /***********************************************************************/
  27. err: procedure expose sigl rxmuierror
  28. parse arg res
  29. say sigl "["res"]"
  30.     say getrxmuistring(res) "in line" sigl-1 rxmuierror
  31.     exit
  32. /***********************************************************************/
  33. createApp: procedure
  34.     app.Title="Wheel"
  35.     app.Version="$VER: Wheel 1.0 (10.12.99)"
  36.     app.Copyright="©1999, alfie"
  37.     app.Author="alfie"
  38.     app.Description="Wheel example"
  39.     app.Base="RXMUIEXAMPLE"
  40.     app.SubWindow="WIN"
  41.      win.ID="MAIN"
  42.      win.Title="Wheel Example"
  43.      win.Contents="MGROUP"
  44.  
  45.       mgroup.0="wh"
  46.         wh.class="wheel"
  47.         wh.frame="button"
  48.         wh.min=0
  49.         wh.max=1000
  50.  
  51.        twh.integer=0
  52.       mgroup.1=Text("twh")
  53.  
  54.       mgroup.2="wv"
  55.         wv.class="wheel"
  56.         wv.frame="button"
  57.         wv.Weight=60
  58.         wv.wheelhoriz=1
  59.         wv.min=0
  60.         wv.max=1000
  61.         wv.value=1000
  62.  
  63.        twv.integer=1000
  64.       mgroup.3=Text("twv")
  65.  
  66.     call NewObj("APPLICATION","APP")
  67.  
  68.     call Notify("WIN","CLOSEREQUEST",1,"APP","RETURNID","QUIT")
  69.     call Notify("wh","value","everytime","twh","set","integer","triggervalue")
  70.     call Notify("wv","value","everytime","twv","set","integer","triggervalue")
  71.  
  72.     call set("win","open",1)
  73.  
  74.     return
  75. /***********************************************************************/
  76. halt:
  77. break_c:
  78.     exit
  79. /**************************************************************************/
  80.