#include <tads.h>

/*
 * An XTads test game.
 * Horiz NON-auto-scroll when layout changes.
 */
main(args)
{
	local b0 = nil;
    
    "A banner test game for XTads.\b\b";

    local b1 = bannerCreate(b0, BannerFirst, nil, BannerTypeText, BannerAlignBottom,
                       50, BannerSizePercent,
                       BannerStyleVScroll | BannerStyleBorder);
    bannerSay(b1, 'b1 is a
        horiz banner window below amd sized to 50% of the
        total application window size.  Has a border
        and a vertical scrollbar, and DOES NOT automatically scroll vertically
        when new contents are displayed and they don\'t fit in the
        window\'s existing height. blah blah blaaaah. blah blah blaaaah. blah blah blaaaah. blah blah blaaaah. 
        blah blah blaaaah. blah blAAAAAAh blaaaah. blah blah blaaaah. blah blah blaaaah. blah blah blaaaaaaaaaaaaaaaah. 
        blah blah blaaaah.  blah blah blaaaah.  blah blah blaaaah. blah blah blaaaah. blah blah blaaaah. 
        blah blah blaaaah. blah blah blaaaahaaaaa. blah blah blaaasssssah. blah blah blaaaah. blah blah blaaaah. blah blah blaaaah. 
        blah blah blaaaah. blah blah blaaaah. blaaaaah blah blaaaah. blah blah blaaaah. blah blah blaaaah. blah blah blaaaah. 
        blah blah blaaaah. blah blah blaaaah. blah blah blaaaaaaaaah. blah blah blaaaah. blah blah blaaaah. blah blah blaaaah. 
        blah blah blaaaah. blah?? blah blaaaah. blah blaaaaah blaaaah. b1 1.');
    "Press a key to continue...\n";
    inputKey();

    local b2 = bannerCreate(b1, BannerFirst, nil, BannerTypeText, BannerAlignBottom,
                       50, BannerSizePercent,
                       0);
    "Press a key to continue...\n";
    inputKey();

    bannerSay(b2, 'b2 (child of b1). horiz banner window below b1, and 50% of its height.
        no border or scroll bars.');
    "Press a key to continue...\n";
    inputKey();

    bannerSay(b1, 'b1...
        blah blah blaaaah. blah blah blaaaah. blah blah blaaaah. blah blah blaaaah. 
        blah blah blaaaah. blah blAAAAAAh blaaaah. blah blah blaaaah. blah blah blaaaah. blah blah blaaaaaaaaaaaaaaaah. 
        blah blah blaaaah.  blah blah blaaaah.  blah blah blaaaah. blah blah blaaaah. blah blah blaaaah. 
        blah blah blaaaah. blah blah blaaaahaaaaa. blah blah blaaasssssah. blah blah blaaaah. blah blah blaaaah. blah blah blaaaah. 
        blah blah blaaaah. blah blah blaaaah. blaaaaah blah blaaaah. blah blah blaaaah. blah blah blaaaah. blah blah blaaaah. 
        blah blah blaaaah. blah blah blaaaah. blah blah blaaaaaaaaah. blah blah blaaaah. blah blah blaaaah. blah blah blaaaah. 
        blah blah blaaaah. blah?? blah blaaaah. blah blaaaaah blaaaah. b1 2.');
    "Press a key to continue...\n";
    inputKey();

    "\bPress another key to exit...\n";
    inputKey();
}
