home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / filemanager / director_1 / !Director / Menus / System / DoClose (.txt) < prev    next >
RISC OS BBC BASIC V Source  |  1995-06-30  |  2KB  |  103 lines

  1.  >Director:Menus.DoClose
  2. $+" at "+
  3.  "OS_GetEnv" 
  4. arg(in$,"-do","")
  5. buffer_size%=1024
  6.  buffer% buffer_size%
  7. )window% = 
  8. read("Director$Window"))
  9. %icon% = 
  10. read("Director$Icon"))
  11.  "Wimp_Initialise",200,&4B534154,"Temp" 
  12.  ,handle%
  13.  do$ 
  14.  "Pin":
  15. close
  16.  "Close":
  17. close
  18.  "Iconise":
  19. iconise
  20. )    
  21.  1,"Unknown operation '"+do$+"'"
  22.  "Wimp_CloseDown",handle%,&4B534154
  23.  "OS_Mouse" 
  24.  x%,y%
  25.     path$=
  26. read("Path")
  27. %1    
  28.  path$="" 
  29.  1,"No path in this window"
  30.     x%-=90
  31.  x%<0 
  32.  x%=0
  33. ()    
  34. "Pin <path> "+
  35. (x%)+" "+
  36. (y%+45)
  37. close
  38.   buffer%!0 = window%
  39.  "Wimp_SendMessage",3,buffer%,window%,icon%
  40. iconise
  41.   buffer%!0 = 20
  42.   buffer%!4 = handle%
  43.   buffer%!8 = 0
  44.   buffer%!12 = 0
  45.   buffer%!16 = 0
  46.  "Wimp_SendMessage",19,buffer%,window%,icon% 
  47.  ,,task_handle%
  48.   buffer%!0 = window%
  49.  "Wimp_GetWindowInfo",,buffer% 
  50.  (buffer%!60) 
  51.  &100 
  52. =K    
  53.  "Wimp_TransferBlock",task_handle%,buffer%!76,handle%,buffer%,256
  54.     title$ = 
  55. 0(buffer%)
  56.     title$ = 
  57. 0(buffer%+76)
  58. title$,1)=" "
  59.     title$=
  60. title$,2)
  61.   a%=
  62. title$," ")
  63.  title$=
  64. title$,a%-1)
  65.     a%=
  66. title$,".")
  67. L#    
  68.  title$=
  69. title$,a%+1)
  70.  a%=0
  71.   buffer%!0 = 48
  72.   buffer%!4 = handle%
  73.   buffer%!8 = 1
  74.   buffer%!12 = 0
  75.   buffer%!16 = &400CA
  76.   buffer%!20 = window%
  77.   buffer%!24 = task_handle%
  78. V!  $(buffer%+28) = 
  79. title$,19)
  80.  R1+20 window handle
  81.  R1+24 task handle for task which owns the window
  82.  R1+28 20 Bytes of title string (last part of first word)
  83.  R1+48
  84.  "Wimp_SendMessage",17,buffer%,0,0
  85. arg(str$,arg$,def$)
  86. str$,arg$)
  87.  i=0 
  88.  =def$
  89. arg$+1
  90. str$+" <"," ",i)
  91. str$,i,j-i)
  92. read(a$)
  93.   ?buffer%=13
  94.  "XOS_ReadVarVal",a$,buffer%,buffer_size%,0,3 
  95.  ,,read%
  96.   buffer%?read%=13
  97. =$buffer%
  98. 0(a%)
  99. o    s$=""
  100.  ?a%>=32
  101.  s$+=
  102.  a%+=1
  103.