home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 22 / AACD 22.iso / AACD / Programming / RxMUI / Examples / pics / b next >
Encoding:
Text File  |  2001-05-24  |  3.8 KB  |  126 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="SPG"
  54.        spg.class="GROUP"
  55.        spg.horiz=1
  56.         spg.0="SPEEDBAR"
  57.          speedbar.class="SPEEDBAR"
  58.          speedbar.spread=0
  59.          speedbar.Horiz=1
  60.          speedbar.RaisingFrame=1
  61.          speedbar.Borderless=1
  62.           speedbar.0.Img="Pics/back.iff"
  63.           speedbar.0.Text="Back"
  64.           speedbar.1.Img="Pics/forward.iff"
  65.           speedbar.1.Text="Forward"
  66.           speedbar.2.Img="Pics/reload.iff"
  67.           speedbar.2.Text="Reload"
  68.           speedbar.3.Img="Pics/stop.iff"
  69.           speedbar.3.Text="Stop"
  70.           speedbar.4.Img="SPACER"
  71.           speedbar.5.Img="Pics/home.iff"
  72.           speedbar.5.Text="Home"
  73.           speedbar.6.Img="Pics/find.iff"
  74.           speedbar.6.Text="Find"
  75.       mgroup.1=HBar()
  76.       mgroup.2="CG"
  77.        cg.class="GROUP"
  78.        cg.columns=4
  79.         cg.0=label("_BorderLess")
  80.         cg.1=checkmark("BL",1,'b')
  81.         cg.2=label("_RaisingFrame")
  82.         cg.3=checkmark("RF",1,'r')
  83.         cg.4=label("_SmallImages")
  84.         cg.5=checkmark("SI",,'s')
  85.         cg.6=label("Sunn_y")
  86.         cg.7=checkmark("SN",,'y')
  87.       mgroup.3="CYCLE"
  88.        cycle.class="CYCLE"
  89.        cycle.entries="TextGfx|Gfx|Text"
  90.  
  91.     res=NewObj("APPLICATION","APP")
  92.     if res~=0 then do
  93.         ioerr=IoErr()
  94.         say ioerr
  95.         call err(res)
  96.     end
  97.     return
  98. /***********************************************************************/
  99. setNotifies: procedure
  100.     res=Notify("WIN","CLOSEREQUEST",1,"APP","RETURNID","QUIT")
  101.     if res~=0 then call err(res)
  102.     res=Notify("BL","SELECTED","EVERYTIME","SPEEDBAR","SET","BORDERLESS","TRIGGERVALUE")
  103.     if res~=0 then call err(res)
  104.     res=Notify("RF","SELECTED","EVERYTIME","SPEEDBAR","SET","RAISINGFRAME","TRIGGERVALUE")
  105.     if res~=0 then call err(res)
  106.     res=Notify("SI","SELECTED","EVERYTIME","SPEEDBAR","SET","SMALLIMAGES","TRIGGERVALUE")
  107.     if res~=0 then call err(res)
  108.     res=Notify("SN","SELECTED","EVERYTIME","SPEEDBAR","SET","SUNNY","TRIGGERVALUE")
  109.     if res~=0 then call err(res)
  110.     res=Notify("SPEEDBAR.0","PRESSED",0,"APP","RETURNID")
  111.     if res~=0 then call err(res)
  112.     res=Notify("CYCLE","ACTIVE",0,"APP","RETURNID")
  113.     if res~=0 then call err(res)
  114.     res=Notify("CYCLE","ACTIVE",0,"SPEEDBAR","SET","VIEWMODE","TEXTGFX")
  115.     if res~=0 then call err(res)
  116.     res=Notify("CYCLE","ACTIVE",2,"SPEEDBAR","SET","VIEWMODE","TEXT")
  117.     if res~=0 then call err(res)
  118.     res=Notify("CYCLE","ACTIVE",1,"SPEEDBAR","SET","VIEWMODE","GFX")
  119.     if res~=0 then call err(res)
  120.     return
  121. /***********************************************************************/
  122. halt:
  123. break_c:
  124.     exit
  125. /**************************************************************************/
  126.