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>popbox()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
POPBOX()

    Yet another box to throw at your users!!  But programming is supposed
    to be fun, so why not?  Here's the syntax:

    POPBOX(<top>, <left>, <bottom>, <right>, <type>, <delay>
           [,<shadow>, <title>, <crossbar>])

    Required Parameters

    <top>, <left>, <bottom>, <right> are integers representing the box
    coordinates.

    <type> is an integer between 1 and 6, and represents the type of box
    desired.  The choices are:

    Box Number            Box Type

        1                  Double
        2                  Single
        3            Double Horiz., Single Vert.
        4            Single Horiz., Double Vert.
        5                 Thick Line
        6                 No border

    <delay> is an integer numeric between 0 and 100, and is used to
    delay the box drawing effect.  The larger the delay, the longer the
    box drawing will take.  Once again, values between 1 and 20 are
    recommended, as is experimentation.

    Optional Parameters

    <shadow> is a logical value.  If True (.T.), a transparent drop
    shadow will be drawn with the box.  If False (.F.), no shadow will
    be drawn.  The default is no shadow.

    <title> is a character string to be used as the box title.  It will
    be centered on the top row of the box.

    <crossbar> is a variable of any type.  It affects the display of the
    box title. If you pass this parameter, the title will be centered on
    the row below the top row of the box, and a horizontal line (or
    crossbar) will be drawn on the row beneath that.  If you do not pass
    this parameter, the title will be centered and framed on the top row
    of the box.

    The box will be drawn from the bottom row up.

    Return Value

    POPBOX() returns a character string, which contains the coordinates
    of the box, followed by the contents of that area of the screen
    prior to the box being drawn.  For example, an exploding box drawn
    at coordinates 0, 0, 24, 79 would return the string containing
    CHR(0) + CHR(0) + CHR(24) + CHR(79), followed by the contents of
    SAVESCREEN(0,0,24,79). This character string can be used by
    ByeByeBox() to redisplay that portion of the screen.

    Note that under Clipper 5, this function returns a five element
    array rather than a concatenated character string.  The structure
    of this array is { <top>, <left>, <bottom>, <right>, <contents>}.
    This makes performance brisker when using BYEBYEBOX().

    Sample usage

    buffer = POPBOX(5, 5, 23, 55, 2, 10)                     
    @ 14,8 SAY 'This box rose like a phoenix from the ashes!'
    ByeByeBox(buffer)                                        

    Unlike the exploding and shrinking boxes, pop-up boxes can be enjoyed
    by those of us unfortunate to still be using monochrome monitors.

    Clipper 5.0 Notes

    POPBOX() and DROPBOX() have been combined into one function,
    which is entitled POPNDROP().  The preprocessor makes this
    transparent to you.  Therefore, you must put the following line at
    the top of any .PRG referring to POPBOX() or DROPBOX():

    #include "grump.ch"

See Also: BYEBYEBOX() DROPBOX() EXBOX() SHRBOX()

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