browser.tfilesource file

TADS 3 Library - browser (Web UI) input/output manager

This module defines the low-level functions for handling input and output via the Web UI.

The functions in this module are designed primarily for internal use within the library itself. Games should use the higher level objects and functions defined in input.t and output.t instead of directly calling the functions defined here. The reason for separating these functions is to make the UI selection pluggable, so that the same game can be compiled for either the traditional UI or the Web UI simply by plugging in the correct i/o module.

Summary of Classes  

WebBannerWin  WebWinOutputStream 

Summary of Global Objects  

browserGlobals  commandWin  statuslineBanner 

Summary of Global Functions  

aHref  aHrefAlt  aioClearScreen  aioInputDialog  aioInputEvent  aioInputFile  aioInputLineCancel  aioInputLineTimeout  aioLogInputEvent  aioMorePrompt  aioSay  aioSetLogFile  checkHtmlMode  evtCharForScript  initDisplay  initUI  readingEventScript  readingScript  statusHTML  terminateUI 

Global Functions  

aHref (href, txt?, title?, flags, =, 0)browser.t[642]

Generate a string to show hyperlinked text. The browser UI is always in HTML mode, so we unconditionally generate the hyperlink.

If the display text is included, we'll generate the entire link, including the <A HREF> tag, the hyperlinked text contents, and the </A> end tag. If the text is omitted, we'll simply generate the <A HREF> tag itself, leaving it to the caller to display the text and the </A>.

The optional 'flags' is a combination of AHREF_xxx flags indicating any special properties of the hyperlink.

aHrefAlt (href, linkedText, altText, title?)browser.t[667]
Generate a string to show hyperlinked text, with alternate text if we're not in HTML mode. The browser UI is always in HTML mode, so we unconditionally generate the hyperlink.

aioClearScreen ( )browser.t[277]
Clear the screen

aioInputDialog (icon, prompt, buttons, defaultButton, cancelButton)browser.t[398]
Show an input dialog

aioInputEvent (timeout)browser.t[241]
Read an input event

aioInputFile (prompt, dialogType, fileType, flags)browser.t[288]
Show a file selector dialog

aioInputLineCancel (reset)browser.t[230]
Cancel a suspended input line

aioInputLineTimeout (timeout)browser.t[195]
Get a line of input from the keyboard, with timeout

aioLogInputEvent (evt)browser.t[525]
Log an input event. We call this internally from each of the event input routines to add the event to any event or command log we're creating.

aioMorePrompt ( )browser.t[267]
Show a "More" prompt

aioSay (txt)browser.t[163]
Write text to the main game window

aioSetLogFile (fname, typ, =, 1)browser.t[429]
Set/remove the output logging file

checkHtmlMode ( )browser.t[147]
Check to see if we're in HTML mode

evtCharForScript (c)browser.t[613]
Get an InEvtKey event parameter in suitable format for script file output. This returns the key as it appears in the event, except that ASCII control characters are translated to '[ctrl-X]'.

initDisplay ( )browser.t[72]
Initialize the display. We call this when we first enter the interpreter, and again at each RESTART, to set up the main game window's initial layout. We set up the conventional IF screen layout, with the status line across the top and the transcript/command window filling the rest of the display.

initUI ( )browser.t[48]
Initialize the user interface. The library calls this once at the start of the interpreter session to set up the UI. For the Web UI, we create the HTTP server and send connection instructions to the client.

readingEventScript ( )browser.t[185]
Is an event script active?

readingScript ( )browser.t[177]
Is a script file active?

statusHTML (stage)browser.t[688]
Generate HTML to wrap the left/right portions of the status line. The basic status line has three stages: stage 0 precedes the left portion, stage 1 comes between the left and right portions, and stage 2 follows the right portion. If we're listing exits, we get two more stages: stage 3 precedes the exit listing, stage 4 follows it.

terminateUI ( )browser.t[113]
Shut down the user interface. The library calls this when the game is about to terminate.

TADS 3 Library Manual
Generated on 5/16/2013 from TADS version 3.1.3