home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 4 / CDPD_IV.bin / fish / 911-930 / ff925 / donsgenies / frenchgenies.lha / Rexx / BoîteEnAvant.pprx < prev    next >
Text File  |  1993-08-03  |  3KB  |  89 lines

  1. /*
  2. @BBoîteEnAvant @P @I Ecrit et © par Don Cox
  3. @IN'est pas du Domaine Publique. Tous Droits Réservés.
  4. Traduit par Fabien Larini le 22/07/93.
  5.  
  6. Ce Génie permet de mettre une boîte en avant en la sélectionnant dans une
  7. liste de boîtes. Pratique dans des constructions complexes ou les boîtes
  8. se recouvrent les unes les autres.*/
  9.  
  10. /* Box to Front
  11. Select a box by name or number and bring it to the front. Useful in complex layouts where there are several boxes on top of each other.
  12. Written by Don Cox */
  13.  
  14. trace n
  15. signal on error
  16. signal on syntax
  17. call ppm_AutoUpdate(0)
  18. cr = "0a"x
  19.  
  20. address command
  21. call SafeEndEdit.rexx()
  22.  
  23. call ppm_ShowStatus("Liste les Boîtes ...")
  24. thispage = ppm_CurrentPage()
  25. totalboxes = ppm_NumBoxes(thispage)
  26. list = ""
  27. box = ppm_PageFirstBox(thispage)
  28. do i = 1 to totalboxes
  29.     number = right(ppm_BoxNum(box),4," ")
  30.     info = ppm_GetBoxInfo(box)
  31.     boxtype = word(info,1)
  32.     boxname = ppm_GetBoxName(box)
  33.     select
  34.         when upper(boxtype) = "TEXTE" then do
  35.             boxtext = ppm_GetBoxText(box,0)
  36.             shorttext = substr(boxtext,1,15)
  37.             if boxname = "" then boxname = shorttext
  38.             end
  39.         when upper(boxtype) = "BITMAP" then do
  40.             filename = word(info,5)
  41.             filename = substr(filename, lastpos("/",filename)+1)
  42.             if boxname = "" then boxname = filename
  43.             end
  44.         when upper(boxtype) = "EPSF" then do
  45.             filename = word(info,3)
  46.             filename = substr(filename, lastpos("/",filename)+1)
  47.             if boxname = "" then boxname = filename
  48.             end
  49.         when upper(boxtype) = "CLIP" then do
  50.             objects = "Clip, "||word(info,2)||" objets"
  51.             if boxname = "" then boxname = objects
  52.             end
  53.         when upper(boxtype) = "VECTORISÉ" then do
  54.             objects = "Aegis, "||word(info,2)||" objets"
  55.             if word(info,2)=1 then objects = "Aegis, 1 object"
  56.             if boxname = "" then boxname = objects
  57.             end
  58.         when upper(boxtype) = "VIDE" then do
  59.            if boxname = "" then boxname = "Vide"
  60.            end
  61.         otherwise boxname = "Type de Boîte Inconnu"
  62.     end
  63.     boxtype = substr(boxtype,1,1)
  64.     list = list||number" "boxtype" "boxname||cr
  65.     box = ppm_PageNextBox(box)
  66.     end
  67.  
  68. call ppm_ClearStatus()
  69. chosen = ppm_SelectFromList("Sélectionnez une Boîte...",35,18,0,list)
  70. box = ppm_SelectBox(word(chosen,1))
  71. call ppm_BoxToFront(box)
  72. exit_msg()
  73.  
  74. error:
  75. syntax:
  76.     do
  77.     exit_msg("Arrêt du Génie dû à l'erreur: "errortext(rc))
  78.     end
  79.  
  80. exit_msg:
  81.     do
  82.     parse arg message
  83.     if message ~= "" then
  84.     call ppm_Inform(1,message,)
  85.     call ppm_ClearStatus()
  86.     call ppm_AutoUpdate(1)
  87.     exit
  88.     end
  89.