COMPILE FUNCTION Comm_Tencor(Instruction, Parm1,Parm2)

/*
	Commuter module for Tencor window
	
	04/14/2004 - John C. Henry, J.C. Henry & Co., Inc.
*/

DECLARE SUBROUTINE Set_Property, End_Dialog, Send_Event, Set_Status, Center_Window
DECLARE SUBROUTINE ErrMsg, Send_Message, Set_Property, Send_Event, Btree.Extract, obj_AppWindow
DECLARE FUNCTION Get_Property, Get_Status, Dialog_Box, Utility, Center_Window, Popup, Collect.Ixvals
DECLARE FUNCTION Send_Message

$INSERT POPUP_EQUATES

EQU CRLF$	TO \0D0A\

EQU LTGREY$		TO	229 + (229*256) + (229*65536)	;* JCH standard colors for edittable backgrounds
EQU GREY$		TO	192 + (192*256) + (192*65536)
EQU GREEN$		TO	192 + (220*256) + (192*65536)
EQU RED$		TO	255 + (128*256) + (128*65536)
EQU BLUE$		TO	128 + (255*256) + (255*65536)
EQU WHITE$		TO	255 + (255*256) + (255*65536)
EQU YELLOW$		TO	255 + (255*256) + (202*65536)
EQU LTBLUE$		TO	128 + (255*256) + (255*65536)
EQU PURPLE$		TO	225 + (181*256) + (255*65536)


ErrTitle = 'Error in Comm_Tencor'
ErrorMsg = ''

Result = ''

BEGIN CASE
	CASE Instruction = 'Create' 			; GOSUB Create
	CASE Instruction = 'Refresh'			; GOSUB Refresh
	CASE Instruction = 'LUScanType'			; GOSUB LUScanType
	CASE Instruction = 'LURdsNo'			; GOSUB LURdsNo
	CASE 1
		ErrorMsg = 'Unknown Instruction passed to routine.'
		ErrMsg(ErrorMsg)
END CASE

RETURN Result



* * * * * * *
Create:
* * * * * * *

obj_Appwindow('Create',@WINDOW)

GOSUB Refresh


RETURN


* * * * * * *
Refresh:
* * * * * * *

RETURN



* * * * * * *
LUScanType:
* * * * * * *

FocusControl = Parm1

IF FocusControl = '' THEN
	FocusControl = Get_Property(@WINDOW,'FOCUS')
END

ScanType = Popup(@WINDOW,'','SURF_SCAN_TYPE')

IF ScanType = '' THEN RETURN

obj_AppWindow('LUValReturn',ScanType:@RM:FocusControl)

RETURN


* * * * * * 
LURdsNo:
* * * * * * 

FocusControl = Parm1

IF FocusControl = '' THEN
	FocusControl = Get_Property(@WINDOW,'FOCUS')
END

RDSKeys = Dialog_Box( 'RDS_QUERY', @WINDOW, '' )

IF RDSKeys = '' THEN RETURN

CONVERT @FM TO @VM IN RDSKeys

TypeOver = ''
TypeOver<PDISPLAY$> = RDSKeys
TypeOver<PMODE$> = 'K'
TypeOver<PTYPE$> = 'F'
TypeOver<PFIELD$> = '3'
TypeOver<PSELECT$> = 1

RDSKey = Popup(@WINDOW,TypeOver,'RDS_QUERY')

IF RDSKey = '' THEN RETURN

obj_AppWindow('LUValReturn',RDSKey:@RM:FocusControl)


RETURN
