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
/
CouleurBoîtesTexte&Marges.pprx
< prev
next >
Wrap
Text File
|
1993-08-03
|
3KB
|
104 lines
/*
@BCouleursBoîtesTexte&Marges @P@IEcrit et © par Don Cox en avril 93
@IN'est pas du Domaine Publique. Tous Droits Réservés.
Traduit et modifié par Fabien Larini le 29/07/93.
Ce Génie permet de choisir la couleur de texte, de remplissage, de trait,
et de donner une valeur identique pour les marges de la boîte. Il
utilise l'épaisseur et le motif de trait courant.
*/
/*BoxesColors&Margins.pprx*/
/* This Genie sets the box and text colours and puts an equal margin all round the box.
Written by Don Cox April '93. Not Public Domain. */
signal on error
signal on syntax
address command
call SafeEndEdit.rexx()
cr="0a"x
call ppm_AutoUpdate(0)
CurrentUnits = ppm_GetUnits()
oldcolor = ppm_GetTextColor()
select
when CurrentUnits = 1 then units="inches"
when CurrentUnits = 2 then units="millimètres"
otherwise units ="points"
end
counter=0
do forever
box=ppm_ClickOnBox("Clickez dans les Boîtes à Modifier")
if box=0 then break
counter=counter+1
boxes.counter=box
call ppm_SelectBox(box)
end
if counter=0 then exit_msg()
colorlist = ppm_GetColorList()
colorlist = substr(colorlist, pos('0a'x, colorlist) + 1)
color = ppm_SelectFromList("Couleur de Remplissage", 25, 18, 0, colorlist)
if color = '' then exit_msg("Annulé")
tcolor = ppm_SelectFromList("Couleur de Texte", 25, 18, 0, colorlist)
if tcolor = '' then exit_msg("Annulé")
choix = ppm_Inform(2,"Voulez vous un cadre de la même Couleur que la couleur de Remplissage","Non","Oui")
if choix = 1 then
couleurtrait = color
else
couleurtrait = ppm_SelectFromList("Couleur du Trait", 25, 18, 0, colorlist)
if couleurtrait = '' then exit_msg("Annulé")
size = ppm_GetUserText(6,"Marges en "units)
if size = "" then exit_msg("Abandon Utilisateur")
if CurrentUnits = 2 then size = size/10 /* mm to cm */
else if CurrentUnits = 3 then size = size/12 /* points to picas */
do i=1 to counter
box=boxes.i
call ppm_SetBoxMargins(box,size,size,size,size)
call ppm_SetBoxFrameData(box,couleurtrait, color, ppm_GetLineWeight(), ppm_GetLinePattern(), 1)
call ppm_SetBoxFrame(box, 1)
call ppm_SetBoxTransparent(box, 0)
if upper(word(ppm_GetBoxInfo(box), 1)) ~= TEXTE then iterate i
call SafeSetEdit.rexx(box)
call ppm_SelectBoxText()
call ppm_SetTextColor(tcolor)
call SafeEndEdit.rexx()
end
call exit_msg()
end
error:
syntax:
do
exit_msg("Arrêt du Génie dû à l'erreur: "errortext(rc))
end
exit_msg:
do
parse arg message
if message ~= "" then
call ppm_Inform(1,message,)
call ppm_SetTextColor(oldcolor)
call ppm_SetWireFrame(0)
call ppm_ClearStatus()
call ppm_AutoUpdate(1)
exit
end