std-getcorner


Synopsis

(std-getcorner <flag> <kwd> <msg> <def> <bpt>) ; => point

Description

STD-GETCORNER is basically the same as (INITGET ...) (GETCORNER ...),

They use the following enhancements:
msg is nicely formatted.

If a lisp function given at the prompt returns a valid type this one is accepted.

The additionally needed INITGET initialization and default value check may be omitted, thus leading to easier looping code.

If the default argument is given (and it is not nil and the flag contains no bitvalue 1), then empty input is allowed as well.

Arguments

flag: integer, same as the INITGET flag or nil

kwd: a initget-like string or a list of strings or nil

msg: a string to be displayed as a prompt or nil.

def: a default value as number, either interpreted as radians (0-2ð) or degrees (0-360) or nil

bpt: a point from which the highlighted box is drawn, relative to the actual UCS.

Return Value

Either the default value or any point entered by the user.

Side Effects

Interrupts the program flow, prints the formatted message and waits for user input.

Module

(std-require 'STDINPUT)

Defined in STDINPUT