#include <tads.h>

/*
 * An XTads test game.
 */
main(args)
{
	local b0 = nil;

    "Main";

    local bsl = bannerCreate(b0, BannerFirst, nil, BannerTypeText, BannerAlignTop,
                       1, BannerSizeAbsolute,
                       0);
	bannerSay(bsl, 'Banner');
	inputKey();


	/* eeve_complicated missing layout constraints bug - REPRODUCES ERROR:
	local b0 = nil;

   "Main";

   local bsl = bannerCreate(b0, BannerFirst, nil, BannerTypeText, BannerAlignTop,
                       1, BannerSizeAbsolute,
                       0);
	bannerSay(bsl, 'Status');
	inputKey();
	
	local centreWin = bannerCreate(nil, BannerLast, nil, BannerTypeText, BannerAlignTop,
    										15, BannerSizeAbsolute, 0);
	bannerSay(centreWin, 'C');
	inputKey();
   
	local rightWin = bannerCreate(centreWin, BannerFirst,nil, BannerTypeText, BannerAlignRight,
    									5, BannerSizePercent, 0);
	bannerSay(rightWin, 'R');
	inputKey();
	*/

	/* eeve_complicated missing layout constraints bug - REPRODUCES ERROR:
	local b0 = nil;

   "Main";

   local bsl = bannerCreate(b0, BannerFirst, nil, BannerTypeText, BannerAlignTop,
                       1, BannerSizeAbsolute,
                       0);
	bannerSay(bsl, 'Status');
	inputKey();
	
	local centreWin = bannerCreate(nil, BannerLast, nil, BannerTypeText, BannerAlignTop,
    										15, BannerSizeAbsolute, BannerStyleBorder);
	bannerSay(centreWin, 'C');
	inputKey();
   
	local rightWin = bannerCreate(centreWin, BannerFirst,nil, BannerTypeText, BannerAlignRight,
    									5, BannerSizePercent, BannerStyleBorder);
	bannerSay(rightWin, 'R');
	inputKey();
	*/


	/*
	local b0 = nil;    
    "A banner test game for XTads.\b<a href=\"Xmaintextlink\">main text link</a>
    <a>main text link no href</a>\b";
    
    local b1 = bannerCreate(b0, BannerFirst, nil, BannerTypeText, BannerAlignTop,
                       20, BannerSizePercent,
                       BannerStyleBorder);
    bannerSay(b1, '<a href="Ybannerlink">banner link</a>');

	 morePrompt();

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

    "Key '<<key>>'. Done. ";
    */
    
    
	/*
	local b0 = nil;
    
    "A banner test game for XTads.\b";

    local b1 = bannerCreate(b0, BannerFirst, nil, BannerTypeText, BannerAlignLeft,
                       20, BannerSizePercent,
                       BannerStyleBorder);

    "\bCreated b1\bPress a key to continue...";
    inputKey();

    bannerDelete(b1);

    "\bDeleted b1 \bPress a key to continue...";
    inputKey();

    local b3 = bannerCreate(b0, BannerLast, nil, BannerTypeText, BannerAlignRight,
                       15, BannerSizePercent,
                       BannerStyleVScroll | BannerStyleBorder);

    "\bCreated b3\bPress a key to continue...";
    inputKey();
    */


	/*
    local b1 = bannerCreate(b0, BannerFirst, nil, BannerTypeText, BannerAlignTop,
                       0, BannerSizeAbsolute,
                       BannerStyleBorder);
                       
    "\bb1 created: top, abs size 0";
    "\bPress a key to continue...";
    inputKey();
    
    bannerSay(b1, 'b1 line 1\nb1 line 2');
    "\bb1 now has 2 lines but is still size 0";
    "\bPress a key to continue...";
    inputKey();
    
    bannerSizeToContents(b1);
    "\bb1 now resized to contents and should ahow 2 lines";
    "\bPress a key to continue...";
    inputKey();

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