enterSegment
enterSegment( [?promptsl_promptList] [?pointsl_pointList] [?forms_form] [?addPointProct_addProcName] [?delPointProct_delProcName] [?initProct_initProcName] [?doneProct_doneProcName] [?formProct_formProcName] [?dontDrawg_dontDraw] [?alwaysMapg_alwaysMap] [?acceptStringg_acceptString] [?acceptNumberg_acceptNumber] [?noInfixg_noInfix] [?cmdNamet_cmdName] [?cursorx_cursor ] ) =>l_point_list/nil
Description
Lets you enter a segment into the current window.
The function accepts two points. After the first point is digitized, a rubberbanding line appears between the first point and the cursor’s current location.
Arguments
|
List of prompt strings to be displayed. Only the first two strings are used. |
|
|
List of no more than two points. If both points are supplied, they are adjusted and returned with no further interaction. If one point is supplied, it is adjusted and displayed as if the user had entered it. After the first point is entered a rubberbanding line appears between the point and |
|
|
Options form created with |
|
|
Name of the SKILL function to be called when a point is entered. |
|
|
Name of the SKILL function to be called when a point is deleted. |
|
|
Name of the SKILL function to be called immediately after the enterfunction is started and before any data entry. |
|
|
Name of the SKILL function to be called when the enterfunction is terminated. |
|
|
Name of the SKILL function to be called when the options form is displayed. |
|
|
Detemines whether or not to immediately display the options form. |
|
|
Determines whether or not to accept string input without terminating the enterfunction. |
|
|
Determines whether or not to accept numeric input without terminating the enterfunction. |
|
|
Name you associate with the enterfunction. If the command name is set, it can be accessed with |
|
|
An integer argument that will default to an appropriate cursor. For example, |
|
Values Returned
Retrieve data through the callback procedure t_doneProcName instead of using the return value for this enterfunction.
Examples
Displays the prompt Enter the second point on the prompt line.
procedure( segDone( w done pts )
if( done then
printf("Segment entered was %L.\n" pts)
else
println("Segment entry aborted.")
)
)
procedure( myEnterSegment( )
enterSegment( ?prompts
list( "Enter the first point."
"Enter the second point." )
?doneProc "segDone"
)
)
Sets infix mode on and bind the s key to the procedure myEnterSegment. Type the s key in a Schematics window at location p1. Because of infix mode, p1 is accepted as the first point for the enterSegment call. The rubberbanding line immediately appears between p1 and the cursor location.
window(1)->infixOn = t
hiSetBindKey("Schematics" "<Key>s" "myEnterSegment( )")
Enter point p2. doneProc prints out the points entered:
Segment entered was ( p1 p2 ).
The enterfunction returns the list of points:
( p1 p2 )

Related Topics
Return to top