install_get_xy_pair()

Installs a user-defined event handler for prompting in the current window. Returns: none.

Syntax:

install_get_xy_pair (aelFuncName[, autoRepeatable, prm1, prm2, trackingStyle]);

where

aelFuncName is a string. AEL function to call when two points are entered through left mouse clickings. The AEL function receives X1, Y1, X2, Y2 as its parameters.

autoRepeatable is optional; sets repeat capability, where:

  • 0 = one-shot (default). The routine is not re-installed after the (x,y) location is entered.
  • 1 =auto-repeatable. The event handler will be invoked every time the mouse is clicked until either the End Command button is pressed or another command is invoked.

prm1 is optional; the parameter to override the default event prompts. This is the prompt, if defined, for the 1st (x,y).

prm2 is optional; the parameter to override the default event prompts. This is the prompt, if defined, for the 2nd (x,y).

trackingStyle is optional; sets the tracking style, where:

  • TRACKING_RECT = rectangle rubberbanding lines between 1st and 2nd points.
  • TRACKING_LINE = (default). straight rubberbanding line between 1st and 2nd points.
  • TRACKING_NONE = no rubberbanding line between 1st and 2nd points.

Example:
defun my_print_2_points(x1,y1,x2,y2)
{
    fputs(stderr, fmt_tokens(list (x1,y1,x2,y2)));
}
install_get_xy_pair("my_print_2_points", 1, "enter the first point", "enter 
the second point", TRACKING_RECT);
Where Used:

Graphical user interface

 

Privacy Statement  | Terms of Use  | Legal | Contact Us  | © Agilent 2000-2008 

Contents
Additional Resources