PROC locale: /* Language specific strings [1.3] */
test=0 /* test 1/2/3/6/10/20/100/200 with new languages, 0 = no test */
lang=getlanguage()
info='FinalWrapper 1.3 by NDY''s'
/* IF default='' THEN default='(put your defaults here and uncomment this line)' */
IF lang="deutsch" THEN /* German */
DO
errtext='"FinalWrapper-Fehler:" "%t" "in Zeile %l (Fehlernummer %n)" "Ok" "" ""'
noselect='"FinalWrapper-Fehler:" "Zuerst einen Textblock oder einen" "Textausschnitt und ein Oval wählen!" "Ok" "" ""'
input='"%i" "Sektorgrösse eingeben (? für Hilfe)" "%d"'
help.0='"Syntax (Argumente in Klammern optional):" "[[A]±n] [D±|D=] [R±|R=|R±n|Rn] [G±] [S±n|S±] [@±n] [H±n] [O±] [?]" "A: Sektorgrösse (0 bis 360), - Text umdrehen. Voreinst.: 360"'
help.1='"Rotieren: Voreinstellung: +0. R+ entspricht R+90, R- R-90" "R+n / R-n dreht jedes Zeichen um weitere n Grad (0 bis 180)" "Rn setzt die Drehung aller Zeichen auf n, R= gleich der des Textblocks"'
help.2='"D (Löschen): Voreinst.: Nur Oval wird gelöscht. D+ auch" "der Textblock wird gelöscht. D- weder Oval noch" "Textblock gelöscht. D= Oval wird kopiert und gelöscht"'
help.3='"Gruppierung: Voreinst.: Oval nicht mitgruppieren" "G+ Oval zum Objekt hinzugruppieren" "G- Oval unsichtbar hinzugruppieren"'
help.4='"Startpunkt: Voreinstellung: 0" "S+n verschiebt den Anfang um n Grad gegen und" "S-n mit dem Uhrzeigersinn (S+ = S+90, S- = S-90)"'
help.5='"@ (Spirale): Voreinst.: 0. @n erzeugt eine Spirale mit ei-" "nem inneren Radius von n% des äusseren. @-n funktio-" "niert analog, jedoch beginnt die Spirale im Innern"'
help.6='"Höhe: Voreinst.: Wert von @, wenn angegeben," "sonst 0. Hn funktioniert wie @n, betrifft aber" "die Grösse der Zeichen statt des Radius"'
help.7='"Optionen speichern: Voreinst.: Nicht speichern" "O+ alle Optionen speichern" "O- alle ausser O- speichern und Abbruch"'
nolib='"FinalWrapper-Fehler:" "Konnte ''%y'' nicht öffnen!" "" "Ok" "" ""'
END
ELSE /* Default: English */
DO
errtext='"FinalWrapper failed:" "%t" "in line %l (errornumber %n)" "Ok" "" ""'
noselect='"FinalWrapper failed:" "Select an oval and a textblock or" "some text before calling FinalWrapper!" "Ok" "" ""'
input='"%i" "Enter sector size (? for help)" "%d"'
help.0='"Syntax (arguments in brackets are optional):" "[[A]±n] [D±|D=] [R±|R=|R±n|Rn] [G±] [S±n|S±] [@±n] [H±n] [O±] [?]" "Angle: Sectorsize (0 to 360), - flips the text. Default: 360"'
help.1='"Rotate: Default: +0. R+ is equal to R+90, R- to R-90" "R+n / R-n rotates each letter for another n degrees (0 to 180)" "Rn sets rotation of all letters to n, R= equal to the textblock''s"'
help.2='"Delete: Default: Only oval deleted. D+ deletes" "the textblock as well. D- prevents the oval from" "being deleted. D= copies oval before deleting it"'
help.3='"Group: Default: Don''t group." "G+ group oval to object" "G- make oval invisible and group it"'
help.4='"Starting point: Default: 0" "S+n moves the start n degree anticlockwise" "S-n moves it clockwise (S+ = S+90, S- = S-90)"'
help.5='"@ (spiral): Default: 0. @n creates a spiral with an inner" "radius of n% of the outer one. @-n works equal" "exept that the spiral now starts at the inside"'
help.6='"Height: Default: Value from @ if given, else 0" "Hn works as @n, but it affects the height of" "the characters, not the radius"'
help.7='"Save options: Default: Don''t save" "O+ save all options" "O- save all options exept O- and cancel"'
helpbutton='"Previous" "Back" "Next"'
helppages=8
fwerrtext.10='Instruction failed'
fwerrtext.20='Invalid arguments'
fwerrtext.100='Unknown instruction'
fwerrtext.200='Couldn''t open fwarexx.library'
nolib='"FinalWrapper failed:" "Couldn''t open ''%y''" "" "Ok" "" ""'
END
input=replacepat(input,"%i",info)
IF test>5 THEN
DO
RC=test
IF test=6 THEN SIGNAL SYNTAX
SIGNAL ERROR
END
RETURN
PROC chosenobjs: /* Selected objects [1.3] */
/* Selected objects */
txt=0
oval=0
len=0
FirstObject "SELECTED"
o=RESULT
IF o~=0 THEN
DO
cnt=0
DO UNTIL o=0
obj.cnt=o
NextObject o "SELECTED"
o=RESULT
cnt=cnt+1
END
/* Search oval and textblock */
DO i=0 TO cnt-1 WHILE oval=0 | txt=0
GetObjectType obj.i
IF RESULT=7 THEN txt=obj.i
IF RESULT=6 THEN oval=obj.i
END
/* Selected text */
IF txt=0 THEN
DO
Extract
text=RESULT
len=Length(text)
END
END
IF (txt=0 & len<=1 | oval=0 | test=2) & test~=3 THEN
DO
ShowMessage 1 1 noselect
CALL bye(5)
END
RETURN
PROC options: /* Input [1.3] */
about=0
DO UNTIL about=-1 & test~=3
RequestText replacepat(input,"%d",default)
/* Help */
IF Pos("?",RESULT)>0 | test=3 THEN
DO
default=replacepat(RESULT,"?","")
about=0
DO UNTIL RESULT=2
ShowMessage 2 0 help.about helpbutton
about=(about+RESULT-2+helppages)//helppages
END
END
ELSE
about=-1
END
PARSE UPPER VAR RESULT "A" ssize " ","D" del " ","R" rrot " ","G" link " ","S" start " ","@" rdim " ","H" hdim " ","O" opt " "