Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Grumpfish Library 3.2 - <b>boxget()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
BOXGET()

    This function draws a box, displays a prompt, and GETs a variable.
    As is customary with Grumpfish functions, BOXGET() handles all
    screen cleanup. It is extremely flexible, allowing you to use a wide
    variety of optional clauses.

    Syntax

    BOXGET <var> PROMPT <prompt> [ PICTURE <pict> ] [ VALID <valid> ] ;
       [ BOXCOLOR <boxcolor> ]  [ COLOR <color> ] [ ROW <row> ] ;
       [ COLUMN <column> ] [ TITLE <title> ] ;
       [NORESTORE] [RESTOREALL] [DOUBLE]

    Required Parameters

    <var> is the name of the variable to be gotten.

    <prompt> is a character expression representing the prompt to be
    displayed.

    Optional Parameters

    <pict> is a character expression representing the PICTURE clause to
    use for the GET variable.

    <valid> is the VALID clause to use for the GET variable.

    <boxcolor> is a character expression representing the color in which
    to draw the box. If you do not specify this, the current color will
    be used.

    <color> is a character expression representing the GET color. You
    must specify this in the format "<standard>,<enhanced>", where
    <enhanced> will be used when the GET is highlighted. If you do not
    specify this, the current standard and enhanced color settings will
    be used.

    <row> and <column> are the top row and left column at which to
    display the box. If you do not specify these parameters, BOXGET()
    will automatically center the box horizontally and/or vertically on
    the screen.

    <title> is a character expression. If you specify this, it will be
    centered on the top row of the box.

    The NORESTORE clause directs BOXGET() not to automatically restore
    the underlying screen upon exit. This can be used primarily to leave
    a series of GETs on the screen. If you specify this clause, the
    contents of the underlying screen will be added to a stack for later
    restoration with the RESTOREALL clause.

    The RESTOREALL clause will restore all screen fragments stored in
    the aforementioned window stack.

    The DOUBLE clause will cause a double-line box to be drawn.  By
    default, the box is single-line.

    Return Value

    BOXGET() does not return a value, because it manipulates <var>
    directly.

    Notes

    You must #include GRUMP.CH in your programs, because it contains the
    user-defined command for BOXGET().

    If you use DELIMITERS, you will be happy to know that BOXGET()
    properly obeys them.

    Sample Usage

    #include "grump.ch"                                                     
                                                                            
    function test                                                           
    local nx := 0                                                           
    boxget nx prompt "Numeric nrest r1 c0" row 1 column 0 norestore         
    boxget nx prompt "Enter your number" picture "9999" ;                   
              norestore row 4 column 0 title "Pick a number" ;              
              boxcolor '+w/r' color '+w/b,+gr/n'                            
    boxget nx prompt "Enter another number" picture "9999" boxcolor '+w/b' ;
              valid nX > 20 restoreall norestore row 7 column 0             
    return nil                                                              

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson