Product Documentation
Cadence User Interface SKILL Reference
Product Version IC23.1, September 2023

enterBox

enterBox(
[ ?prompts l_promptList ] 
[ ?points l_pointList ] 
[ ?form s_form ] 
[ ?addPointProc t_addProcName ] 
[ ?delPointProc t_delProcName ] 
[ ?initProc t_initProcName ] 
[ ?doneProc t_doneProcName ]
[ ?formProc t_formProcName ]
[ ?dontDraw g_dontDraw ]
[ ?alwaysMap g_alwaysMap ]
[ ?acceptString g_acceptString ]
[ ?acceptNumber g_acceptNumber ]
[ ?noInfix g_noInfix ]
[ ?cmdName t_cmdName ]
[ ?cursor x_cursor ]
) 
=> l_bBox / nil 

Description

Enters a box in the current window.

Arguments

?prompts l_promptList

  

List of prompt strings to appear on the CIW prompt line. If supplied, only the first two strings are used. Each string corresponds to one of the two points needed to specify the box.

?points l_pointList

  

List of no more than two points specifying the box. If both points are specified, the box is returned after adjustment. If not, you are prompted for the point or points not specified. If one point is supplied, it is adjusted as if you had entered it. After you enter the first point, a rubberbanding box is drawn between the first point and the cursor’s current position. After the second point is entered, the function returns a list of two points. The list returned is normalized so that the first point corresponds to the lower left corner of the box; the second is the upper right corner.

?form s_form

Options form created with hiCreateOptionsForm. This form is displayed when you call hiToggleEnterForm. It contains options relevant to the enterfunction and its caller.

?addPointProc t_addProcName

  

Name of the SKILL function to be called when a point is entered.

?delPointProc t_delProcName

  

Name of the SKILL function to be called when a point is deleted.

?initProc t_initProcName

  

Name of the SKILL function to be called immediately after the enterfunction is started and before any data entry.

?doneProc t_doneProcName

  

Name of the SKILL function to be called when the enterfunction is terminated.

?formProc t_formProcName

  

Name of the SKILL function to be called when the options form is displayed.

?dontDraw g_dontDraw

  

Determines whether or not to draw rubber band lines.

?alwaysMap g_alwaysMap

  

Determines whether or not to immediately display the options form.

?acceptString g_acceptString

  

Determines whether or not to accept string input without terminating the enterfunction.

?acceptNumber g_acceptNumber

  

Determines whether or not to accept numeric input without terminating the enterfunction.

?noInfix g_noInfix

  

Determines whether or not to disable infix mode.

?cmdName t_cmdName

  

Name you associate with the enterfunction. If the command name is set, it can be accessed with hiGetCurrentCmd.

?cursor x_cursor

An integer argument that will default to an appropriate cursor. For example, hicArrowRectangle for enterBox and hicArrowArc for enterArc. For more information on all available cursors see hiSetCursor.

Value Returned

l_bBox

A list of two points.

nil

A nil list is returned.

Retrieve data through the callback procedure t_doneProcName instead of using the return value for this enterfunction.

Examples

The prompt Enter the first corner of your box is displayed on the CIW prompt line. myForm is a form containing two string items, one for the layer and one for the purpose. The form is immediately displayed, regardless of user ability mode. The layer-purpose pair is initially y2 and drawing. You change the layer to ndiff and the purpose to pin.

procedure( boxDone( w done pts )
if( done then
printf("Box entered was %L. Layer is %L %s.\n" pts
list( myForm->layer->value
myForm->purpose->value)
hiGetWindowName(w))
else
println("Box entry aborted.")
)
)
procedure( boxForm( form map )
if( map then
eval(form)->layer->value = "y2"
eval(form)->purpose->value = "drawing"
println("map form")
else
println("unmap form")
)
)
hiCreateOptionsForm(
’myForm
"Layer Entry"
list(hiCreateStringField(
?name ’layer
?prompt "purpose"
)
hiCreateStringField(
?name ’purpose
?prompt "purpose"
)
)
nil
)
procedure( test( )
enterBox(
?prompts list("Enter the first corner of your box."
"Enter the last corner of your box.")
?doneProc "boxDone"
?formProc "boxForm"
?alwaysMap t
?form eval(myForm)
)
)
hiSetBindKey("Layout" "<Key>5" "test( )")

A rubberband box appears from p1 to the cursor. Enter point p2 and doneProc prints out the box points:

Box entered was ( p1 p2 ). Layer is ("ndiff" "pin").

The enterfunction returns the box points:

( p1 p2 )

Related Topics

User Entry Functions

hiCreateOptionsForm

undrawEnterFun

hiGetCurrentCmd


Return to top
 ⠀
X