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

enterPoints

enterPoints(
[ ?prompts l_promptList] 
[ ?points l_pointList]
[ ?form s_form] 
[ ?addPointProc t_addProcName] 
[ ?delPointProc t_delProcName] 
[ ?initProc t_initProcName] 
[ ?doneProc t_doneProcName]
[ ?formProc t_formProcName]
[ ?wantPoints x_pointLimit] 
[ ?alwaysMap g_alwaysMap]
[ ?acceptString g_acceptString]
[ ?acceptNumber g_acceptNumber]
[ ?noInfix g_noInfix]
[ ?cmdName t_cmdName]
[ ?cursor x_cursor]
) 
=> l_coord_pair 

Description

Prompts you to enter a list of points.

Arguments

?prompts l_promptList

  

List of prompt strings to be displayed for successive points.

?points l_pointList

  

List of points to be preloaded into the enterfunction. If this list is terminated by two identical points, the function returns the adjusted points with no further interaction. If not, any points in this list are added. The points are not displayed, and there is no rubber band line connecting any of the points. The function is terminated in the same manner as other multi-point enterfunctions.

?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.

?wantPoints x_pointLimit

  

Maximum number of points to be accepted by this function. Collects points until the number of points specified by x_pointLimit is reached or until you finish or cancel the enterfunction. Nothing is drawn by the enterfunction.

?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_coord_pair

The adjusted points entered as a list of points.

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

Examples

Displays the prompt Enter a point is displayed on the prompt line.

procedure( pointsDone( w done pts )
if( done then
printf("Points entered were %L.\n" pts)
else
println("Point entry aborted.")
)
)
enterPoints( ?prompts
list( "Enter the first point."
"Enter the next point." )
?doneProc "pointsDone"
)

When you enter point p1 the prompt changes to Enter the next point Unlike enterLine, no rubber band line appears between p1 and the current cursor location.

Enter point p2. The prompt reads the same— Enter the next point— because the second prompt in the list is used for any points after the first. Continue with p3.

finishEnterFun( )

doneProc prints the points entered:

Points entered were ( p1 p2 p3 ).

The enterfunction returns the point list:

( p1 p2 p3 ) 

Related Topics

User Entry Functions

hiCreateOptionsForm

undrawEnterFun

hiGetCurrentCmd


Return to top
 ⠀
X