enterEllipse
enterEllipse( [?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_bBox
Description
Enters an ellipse in the current window.
An ellipse is defined by its bounding box, therefore, only horizontally and vertically oriented ellipses can be entered.
Arguments
|
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 bounding box of the ellipse. |
|
|
List of no more than two points specifying the ellipse bounding box. If both points are specified, the box is returned after adjustment. If not, you are prompted for the remaining point or points. If one point is supplied, it is adjusted as if you had entered it. After you enter the first point, a rubberbanding ellipse is drawn inside the bounding box defined by 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. |
|
|
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. |
|
|
Determines 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, |
|
Value Returned
Retrieve data through the callback procedure t_doneProcName instead of using the return value for this enterfunction.
Examples
Displays the prompt Enter the first ellipse point on the CIW prompt line. When you enter point p1 the prompt changes to Enter the second ellipse point. A rubberband ellipse appears with a bounding box constructed from p1 and the current cursor location.
procedure( ellipseDone( w done pts )
if( done then
if( stringp(pts) then
pts = list( pts "drawing" )
leGetEntryLayer(pts)
printf("Current layer changed to %L.\n" pts)
else
printf("Ellipse entered was %L. Layer is %L.\n" pts
leGetEntryLayer( ))
else
println("Ellipse entry aborted.")
)
)
)
enterEllipse( ?prompts
list( "Enter the first ellipse point."
"Enter the second ellipse point." )
?doneProc "circleDone" ?acceptString t
)
Type “thinox” into the CIW. doneProc notes the change:
Current layer changed to ("thinox" "drawing").
The enterfunction is still active, as shown by the rubberband ellipse and the CIW prompt. Enter point p2. doneProc prints the ellipse points:
Ellipse entered was ( p1 p2 ). Layer is ("thinox" "drawing").
Here, (p1 p2) is the bounding box of the circle entered. The enterfunction returns the ellipse points:
( p1 p2 )

Related Topics
Return to top