enterArc
enterArc(
[ ?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_point_list / nil
Description
Enters an arc into the current window.
An arc is defined as a portion of a horizontally or vertically oriented ellipse. It is specified by three points: the starting point of the arc on the ellipse, the ending point of the arc on the ellipse, and a point between them through which the arc must pass. An arc can subtend no more than 180 degrees.
Arguments
|
?prompts l_promptList
|
|
|
List of prompt strings to appear on the CIW prompt line. If supplied, only the first three strings are used. Each string corresponds to one of the three points needed to specify the arc.
|
|
?points l_pointList
|
|
|
List of no more than three points specifying the arc. If all three points are supplied, the enterfunction returns the list after adjustment. Otherwise, the supplied points are adjusted and displayed as if you had entered them explicitly.
After the first point is entered, a rubberband line is drawn between this point and the cursor’s current position. After the second point is entered, a rubberbanding arc is drawn so that it passes through the first and second points and the cursor’s current position. When the third point is entered, the function returns the point list.
If you attempt to enter a point through which a legal arc cannot be drawn, nothing is displayed. If the function is terminated at this point, no points are returned.
|
|
?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 rubberband 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 to 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_point_list
|
The list of points you entered in user units.
|
|
nil
|
The function is canceled or an arc could not be generated from the entered points.
|
Retrieve data through the callback procedure t_doneProcName instead of using the return value for this enterfunction.
Examples
Displays the prompt Enter the first point of your arc on the CIW prompt line. When you enter point p1, the prompt changes to Enter the second point of your arc and a rubber band line appears from p1 to the cursor. Enter point p2 and the line becomes an arc while the prompt changes to Enter the last point of your arc.
procedure( arcDone( w done pts )
if( done then
printf("Arc points are %L.\n" pts)
else
println("Arc entry aborted.")
)
)
enterArc( ?prompts list( "Enter the first point of your arc."
"Enter the second point of your arc."
"Enter the last point of your arc." )
?doneProc "arcDone"
)
Finally, enter point p3 and doneProc prints the three arc points:
Arc points are ( p1 p2 p3 ).
The enterfunction returns a list of the three arc points.
( p1 p2 p3 )
Related Topics
User Entry Functions
hiCreateOptionsForm
undrawEnterFun
hiGetCurrentCmd
Return to top