
! script name: defaults.d/inversepens
! topic: set drafting switches

!A
!A NAME: 
!A
!A	Inverse Pens
!A
!A DESCRIPTION:
!A
!A 	Inverse pens are used for moving objects on the screen without
!A 	erasing the graphics that they pass over.  There are 5 inverse
!A 	pen values 0,1,2,3,4.  The colors associated with them are set in
!A
!A 		/usr/weber/webdef/defaults/webdefaults
!A
!A 	If there are not enough color resourses on the hardware
!A 	the inverse pens may not color properly.
!A
!B INSTRUCTIONS:
!B
!B 	ZOOM BOX PEN 0 1 2 3 4: Enter the inverse
!B 		pen number to be used for the zoom box.
!B
!B 	TOOL PLOT PEN 0 1 2 3 4: Enter the inverse
!B 		pen number to be used for the tool plot pen.
!B
!B 	DYNAMIC MOTION PEN 0 1 2 3 4: Enter the inverse
!B 		pen number to be used for the dynamic motion pen.
!B

stat=ChangeLabelStr("ScriptNameStatus","Function: set inverse pens ")

DIM Answer$[256]
DIM Name$[256]
DIM Destination$[256]
DIM Title$[256]
DIM Label$[256]
DIM Namelist$[1250]
DIM Directory$[500]

DEG

Start:!

Title$="SET INVERSE PENS"
Label$="ITEM SELECTED"

Namelist$=""

A= GetDefault(WsZoomBoxPen)
Answer$= VAL$(A)
Namelist$=Namelist$&"ZOOM BOX PEN:   "&Answer$&","

A= GetDefault(WsToolPlotPen)
Answer$= VAL$(A)
Namelist$=Namelist$&"TOOL PLOT PEN:   "&Answer$&","

A= GetDefault(WsDynamicPen)
Answer$= VAL$(A)
Namelist$=Namelist$&"DYNAMIC MOTION PEN:   "&Answer$&","

Stat=GeneralListBox(Title$,Label$,Namelist$)
Stat=SetInputFormat("a99"," ")
Stat=GetValue("SELECT ITEM",Answer$)
IF (ExitScript(Destination$)) THEN Leave

stat= SetInputFormat("n4"," ")

Name$=Answer$
A= POS(Name$,":")
IF A>1 THEN
	Name$= Name$[1,A-1]
END IF


SELECT Name$

CASE "ZOOM BOX PEN"
	A= GetDefault(WsZoomBoxPen)
	stat= SetInputFormat("n4="," ")
	stat= SetEqualsValue(A)
	Answer= GetValue("ZOOM BOX PEN 0 1 2 3 4 ")
	IF (ExitScript(Destination$)) THEN Leave
	Stat=SetDefaults(WsZoomBoxPen,Answer)
CASE "TOOL PLOT PEN"
	A= GetDefault(WsToolPlotPen)
	stat= SetInputFormat("n4="," ")
	stat= SetEqualsValue(A)
	Answer= GetValue("TOOL PLOT PEN 0 1 2 3 4 ")
	IF (ExitScript(Destination$)) THEN Leave
	Stat=SetDefaults(WsToolPlotPen,Answer)
CASE "DYNAMIC MOTION PEN"
	A= GetDefault(WsDynamicPen)
	stat= SetInputFormat("n4="," ")
	stat= SetEqualsValue(A)
	Answer= GetValue("DYNAMIC MOTION PEN 0 1 2 3 4 ")
	IF (ExitScript(Destination$)) THEN Leave
	Stat=SetDefaults(WsDynamicPen,Answer)
CASE "CANCEL"
	LowerSelectBox
	LOAD "typecontrol"
END SELECT

GOTO Start

Leave:!
LowerSelectBox
IF (NOT LEN(Destination$)) THEN
	 LOAD "typecontrol"
ELSE
	 LOAD Destination$
END IF
END
