home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d5xx / d559 / apig.lha / APIG / apiglib_v11.lzh / e5_menus.rexx < prev    next >
OS/2 REXX Batch file  |  1991-09-28  |  3KB  |  93 lines

  1.  
  2. /*  */
  3.  x = addlib("apig.library",0,-30,0)
  4.  
  5.  portname = "example5_port"
  6.  p = openport(portname)
  7.  
  8.  call set_apig_globals()
  9.  
  10.  scrtitle    = "Hey Buddy, Yea You,  This is Your New Screen  !"
  11.  wintitle    = "This is your title"
  12.  winidcmp    = CLOSEWINDOW+MENUPICK
  13.  winflags    = WINDOWCLOSE+WINDOWDEPTH+ACTIVATE
  14.  
  15.  scr = openscreen(0,0,640,400,4,4,5,LACE+HIRES,CUSTOMSCREEN,scrtitle)
  16.  
  17.  /* open window */
  18. w1  = openwindow(portname,,,640,400,2,4,winidcmp,winflags,wintitle,scr,,,) 
  19. w1rptr = getwindowrastport(w1)
  20.  
  21. menu0 = makemenu(0,"MENU0",0,60,0,0)
  22.         item1 = makeitem(menu0,"Menu0 Item 1",menu0,0,0,0,0,0,0,0,1,0,jam2,0,0)
  23.  
  24. menu1 = makemenu(menu0,"MENU1",0,60,0,menu0)
  25.         item1 = makeitem(menu0,"Menu1 Item 1",menu1,0,0,0,0,0,0,0,1,0,jam2,0,0)
  26.  
  27. left  = 50
  28. menu2 = makemenu(menu0,"MENU2",0,60,0,menu0)
  29.         item1 = makeitem(menu0,"Menu2 Item 1",menu2,0,0,0,0,0,0,0,1,0,jam2,0,0)
  30.         sub1 = makesubitem(menu0,"SubItem1",item1,left,0,0,0,0,0,0,1,0,jam2,0,0)
  31.         sub2 = makesubitem(menu0,"SubItem2",item1,left,0,0,0,0,0,0,1,0,jam2,0,0)
  32.         call makesubitem(menu0,"SubItem3",item1,left,0,0,0,0,0,0,1,0,jam2,0,0)
  33.  
  34. menu3 = makemenu(menu0,"MENU3",0,60,0,menu0)
  35.         item1 = makeitem(menu0,"Menu3 Item 1",menu3,0,0,0,0,0,0,0,1,0,jam2,0,0)
  36.  
  37. menu4 = makemenu(menu0,"MENU4",0,60,0,menu0)
  38.         item1 = makeitem(menu0,"Menu4 Item 1",menu4,0,0,0,0,0,0,0,1,0,jam2,0,0)
  39.         item2 = makeitem(menu0,"Menu4 Item 2",menu4,0,0,0,0,0,0,0,1,0,jam2,0,0)
  40.         item3 = makeitem(menu0,"Menu4 Item 3",menu4,0,0,0,0,0,0,0,1,0,jam2,0,0)
  41.         call makeitem(menu0,"Menu4 Item 4",menu4,0,0,0,0,0,0,0,1,0,jam2,0,0)
  42.         call makeitem(menu0,"Menu4 Item 5",menu4,0,0,0,0,0,0,0,1,0,jam2,0,0)
  43.  
  44. menu5 = makemenu(menu0,"MENU5",0,60,0,menu0)
  45.         item1 = makeitem(menu0,"Menu5 Item1",menu5,0,0,0,0,0,0,0,1,0,jam2,0,0)
  46.         call makeitem(menu0,"Menu5 Item2",menu5,0,0,0,0,0,0,0,1,0,jam2,0,0)
  47.         call makeitem(menu0,"Menu5 Item3",menu5,0,0,0,0,0,0,0,1,0,jam2,0,0)
  48.         call makeitem(menu0,"Menu5 Item4",menu5,100,65536,0,0,0,0,0,1,0,jam2,0,0)
  49.         call makeitem(menu0,"Menu5 Item5",menu5,100,0,0,0,0,0,0,1,0,jam2,0,0)
  50.         call makeitem(menu0,"Menu5 Item6",menu5,100,0,0,0,0,0,0,1,0,jam2,0,0)
  51.         call makeitem(menu0,"Menu5 Item7",menu5,200,65536,0,0,0,0,0,1,0,jam2,0,0)
  52.         call makeitem(menu0,"Menu5 Item8",menu5,200,0,0,0,0,0,0,1,0,jam2,0,0)
  53.         call makeitem(menu0,"Menu5 Item9",menu5,200,0,0,0,0,0,0,1,0,jam2,0,0)
  54.         sub1 = makesubitem(menu0,"SubItem1",item1,left,0,0,0,0,0,0,1,0,jam2,0,0)
  55.         sub2 = makesubitem(menu0,"SubItem2",item1,left,0,0,0,0,0,0,1,0,jam2,0,0)
  56.         call makesubitem(menu0,"SubItem3",item1,left,0,0,0,0,0,0,1,0,jam2,0,0)
  57.  
  58. x = setmenustrip(w1,menu0)
  59.  
  60. exitme = 0
  61.  
  62. z = pitext(w1rptr,200,80,"A Simple Menu Example",1,0,JAM2,0)
  63.  
  64. do forever
  65.      x = waitpkt(portname)
  66.   
  67.      do forever 
  68.   
  69.         msg = '0000 0000'x
  70.         msg = getpkt(portname)
  71.  
  72.         if msg = '0000 0000'x then leave
  73.  
  74.         class = getarg(msg,0)
  75.       
  76.         if class = CLOSEWINDOW then exitme = 1
  77.  
  78.         x = reply(msg,0)  
  79.      end  
  80.  
  81.    if exitme = 1 then leave
  82.    
  83. end
  84.  
  85. z = freemenu(menu0)
  86.  
  87. z = closewindow(w1)
  88.  
  89. z = closescreen(scr)
  90.  
  91. exit
  92.  
  93.