home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 109 / EnigmaAmiga109CD.iso / software / sviluppo / rxmui / examples / z.rexx < prev   
OS/2 REXX Batch file  |  1999-12-21  |  5KB  |  196 lines

  1. /* */
  2.  
  3. l="rmh.library";if ~show("L",l) then;if ~addlib(l,0,-30) then exit
  4. if AddLibrary("rxmui.library")~=0 then exit
  5.  
  6. call rxmuiopt("DEBUGMODE SHOWERR")
  7.  
  8. call child("STRIP","MPROJECT","MENU")
  9. mproject.Title="Project"
  10.  call child("MPROJECT",menuitem("MOPEN","Open...","O"))
  11.  call child("MPROJECT",menuitem("MSAVE","Save","S"))
  12.  call child("MPROJECT",menuitem("MSAVEAS","Save as...","W"))
  13.  call child("MPROJECT",menuitem("","BAR"))
  14.  call child("MPROJECT",menuitem("MABOUT","About...","?"))
  15.  call child("MPROJECT",menuitem("MABOUTMUI","About MUI..."))
  16.  call child("MPROJECT",menuitem("","BAR"))
  17.  call child("MPROJECT",menuitem("MHIDE","Hide","H"))
  18.  call child("MPROJECT",menuitem("","BAR"))
  19.  call child("MPROJECT",menuitem("MQUIT","Quit","Q"))
  20. call child("STRIP","MEDITOR","MENU")
  21. meditor.Title="Editor"
  22.  call child("MEDITOR",menuitem("MRESTORE","Restore","R"))
  23. call child("STRIP","MPREFS","MENU")
  24. mprefs.Title="Preferences"
  25.  call child("MPREFS",menuitem("MUSE","Use"))
  26.  call child("MPREFS",menuitem("MSAVE","Save"))
  27.  call child("MPREFS",menuitem("MMUI","Mui"))
  28. res=NewObj("MENUSTRIP","STRIP")
  29. if res~=0 then call err(res)
  30.  
  31. extra.Title="Extra"
  32.  call child("EXTRA",menuitem("UP","Up"))
  33.  call child("EXTRA",menuitem("DOWN","Down"))
  34.  call child("EXTRA",menuitem("EOL","Eol"))
  35. res=NewObj("MENU","EXTRA")
  36. if res~=0 then call err(res)
  37.  
  38. kk=menuitem("MLOVE","Lova","L")
  39.  
  40. app.Title="ShowHide"
  41. app.Version="$VER: ShowHide 1.0 (22.11.99)"
  42. app.Copyright="©1999, alfie"
  43. app.Author="alfie"
  44. app.Description="ShowHide show"
  45. app.Base="SHOW"
  46. app.SubWindow="WIN"
  47.  win.Title="ShowHide"
  48.  win.ID="SHOW"
  49.  win.userightborderscroller=1
  50.  win.usebottomborderscroller=1
  51.  win.Contents="MGROUP"
  52.   mgroup.0="BG"
  53.    bg.class="GROUP"
  54.    bg.horiz=1
  55.    bg.0 = Button("SORT","_Sort")
  56.    bg.1 = Button("REMOVE","_Remove")
  57.   mgroup.1="G"
  58.    g.class="GROUP"
  59.    g.horiz=1
  60.    g.0="LISTVIEW1"
  61.     listview1.class="NLISTVIEW"
  62.     listview1.list="LIST1"
  63.     list1.title="Uno|Due"
  64.     list1.titleclick=2
  65.     list1.DRAGSORTABLE=0
  66.     list1.dragtype="IMMEDIATE"
  67.     list1.multiselecte="DEFAULT"
  68.     list1.Format="BAR W=-1,BAR W=-1"
  69.     list1.mincolsortable=0
  70.     list1.titlemark=0
  71.      list1.0="Emi|Ranieri"
  72.      list1.1="Miriam|Fiocca"
  73.      list1.2="Camillo|Palmieri"
  74.    g.1="LISTVIEW2"
  75.     listview2.class="NLISTVIEW"
  76.     listview2.list="LIST2"
  77.     list2.dragsortable=1
  78.     list2.dragtype="IMMEDIATE"
  79.     list2.Format="COL=1 BAR,COL=0 BAR"
  80.     list2.dragsortinsert=1
  81.      list2.0="Alfonso Ranieri"
  82.      list2.1="Franco|Fiocca"
  83.      list2.2="Tiziana|Spognardi"
  84.      list2.3="Angelo|Barone"
  85.   mgroup.2="H"
  86.    h.class="GROUP"
  87.    h.horiz=1
  88.    h.0="S1"
  89.     s1.class="STRING"
  90.     s1.stringmaxlen=256
  91.     s1.multiline=0
  92.     s1.Styles=4
  93.     s1.isnumeric=0
  94.     s1.frame="STRING"
  95.     s1.draggable=1
  96.     s1.droppable=0
  97.     s1.disabled=0
  98.    h.1=Button("B1","Button1")
  99.    h.2=Button("B2","Button1")
  100.    h.3=CheckMark("C1")
  101.    h.4=String("S2")
  102.  
  103. res=NewObj("APPLICATION","APP")
  104. if res~=0 then call err(res)
  105.  
  106. res=Notify("B1","PRESSED",0,"APP","RETURNID")
  107. if res~=0 then call err(res)
  108.  
  109. res=Notify("LIST1","ACTIVE","EVERYTIME","APP","SETVAR","ACT")
  110. if res~=0 then call err(res)
  111.  
  112. res=DandD("LIST2","LIST1","REMOVE")
  113. if res~=0 then call err(res)
  114.  
  115. res=DandD("LIST1","LIST2")
  116. if res~=0 then call err(res)
  117.  
  118. res=DandD("LIST1","S1")
  119. if res~=0 then call err(res)
  120.  
  121. res=Notify("WIN","CLOSEREQUEST",1,"APP","RETURNID","QUIT")
  122. if res~=0 then call err(res)
  123.  
  124. res=Notify("SORT","PRESSED",0,"LIST1","SORT")
  125. if res~=0 then call err(res)
  126.  
  127. res=Notify("REMOVE","PRESSED",0,"LIST1","REMOVE","ACTIVE")
  128. if res~=0 then call err(res)
  129.  
  130. res=Notify("REMOVE","PRESSED",0,"APP","RETURNID")
  131. if res~=0 then call err(res)
  132.  
  133. res=Notify("LIST1","TITLECLICK","EVERYTIME","LIST1","SORT2","TRIGGERVALUE","ADD2VALUES")
  134. if res~=0 then call err(res)
  135.  
  136. res=Notify("LIST1","SORTTYPE","EVERYTIME","LIST1","SET","TITLEMARK","TRIGGERVALUE")
  137.  
  138. res=set("LIST1","ACTIVE",0)
  139. if res~=0 then call err(res)
  140.  
  141. res=Notify("LIST1","ACTIVE","EVERYTIME","LIST1","GETENTRY","ACTIVE","A")
  142. if res~=0 then call err(res)
  143.  
  144. res=Notify("LIST1","ACTIVE","EVERYTIME","APP","RETURNID")
  145. if res~=0 then call err(res)
  146.  
  147. res=Notify("C1","SELECTED","EVERYTIME","B1","SET","DISABLED","TRIGGERVALUE")
  148. res=Notify("C1","SELECTED","EVERYTIME","B1","SET","DISABLED","TRIGGERVALUE")
  149. res=Notify("C1","SELECTED","EVERYTIME","B1","SET","DISABLED","TRIGGERVALUE")
  150. if res~=0 then call err(res)
  151.  
  152. res=Notify("C1","SELECTED","EVERYTIME","S2","SET","CONTENTS","Alfonso")
  153. if res~=0 then call err(res)
  154.  
  155. res=set("WIN","OPEN",1)
  156. if res~=0 then call err(res)
  157.  
  158. s=0
  159. do forever
  160.     call handle("APP","H",s)
  161.     do i=0 to h.num-1
  162.         if h.i="QUIT" then exit
  163.         say h.num-1 h.i
  164.         if h.i=="B1" then do
  165.             say act
  166.             set("WIN","OPEN",0)
  167.             f.window="WIN"
  168.             f.SLEEPWINDOW=0
  169.             res=ReqFile("F")
  170.             if res~=0 then say getrxaslstring(res)
  171.             set("WIN","OPEN",1)
  172.         end
  173.  
  174.         if h.i=="REMOVE" then do
  175.             res=set("WIN","OPEN",0)
  176.             if res~=0 then call err(res)
  177.             res=Dispose("B1")
  178.             if res~=0 then call err(res)
  179.             res=Dispose("S2")
  180.             if res~=0 then call err(res)
  181.             res=set("WIN","OPEN",1)
  182.             if res~=0 then call err(res)
  183.         end
  184.     end
  185.     s=Wait(or(h.signals,2**12))
  186.     if and(s,2**12)~=0 then exit
  187. end
  188. exit
  189.  
  190. err: procedure expose sigl rxmuierror
  191. parse arg res
  192. say signl "["res"]"
  193.     say getrxmuistring(res) "in line" sigl-1 rxmuierror
  194.     exit
  195.  
  196.