std-getpoint


Synopsis

(std-get1point <msg>)

(std-get2point <bpt> <msg>)

(std-getpoint <flag> <kwd> <msg> <def> <bpt> )

Description

STD-GET1POINT is basically the same as GETPOINT with one argument,

STD-GET2POINT the same as GETPOINT with two arguments,

STD-GETPOINT (full options) simulates (PROGN (INITGET flag kwd)(STD-GET2POINT)) and more.

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.

With std-getpoint the additional 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 or nil

bpt: a point from which a rubberband is drawn, and if a point is entered, from which a highlighted line is drawn or nil.

Return Value

Same as GETPOINT.

Side Effects

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

Module

(std-require 'STDINPUT)

Defined in STDINPUT