webMainWinobject
The standard “main window” of our user interface. This is the game object that represents the default initial HTML page that the player’s web browser connects to. We build this out of three base classes:
- WebResourceInit, because this is the starting page that the browser initially connects to. This class does the initial handshaking to set up the session.
- WebResourceResFile, because we store the HTML for the page in a resource file. This class does the work of sending the resource file’s contents to the browser.
- WebLayoutWindow, because the default main page is also a layout window, which is basically a container for IFRAME elements where we plug in the sub-windows that make up the game’s user interface.
Games can customize the front page in any way they like. If you want to customize the HTML of the main page, you can substitute a different HTML (.html) file, and change the processName() method to return the name of that file. If you want to use something other than a layout window as the front page, you can simply replace this whole class.
transient
webMainWin
:
WebResourceInit
WebLayoutWindow
WebResourceResFile
Superclass Tree (in declaration order)
webMainWin
WebResourceInit
` object
[
WebLayoutWindow](../object/WebLayoutWindow.html)
[
WebWindow](../object/WebWindow.html)
[
WebResourceResFile](../object/WebResourceResFile.html)
[
WebResource](../object/WebResource.html)
object
[
WebResourceResFile](../object/WebResourceResFile.html)
[
WebResource](../object/WebResource.html)
object`
Summary of Properties
curCmdClient
fileDialogResult
fileDialogState
inputDialogResult
inputDialogState
inputEventResult
inputEventState
menuSysState
name
pathName
synthEventQueue
title
vpath
Inherited from WebResourceInit
:
server
Inherited from WebLayoutWindow
:
frames
src
Inherited from WebWindow
:
sthCtx
Inherited from WebResourceResFile
:
binaryExts
browserExtToMime
Inherited from WebResource
:
group
priority
Summary of Methods
getInputDialog
getInputEvent
getInputFile
getInputFileFromClient
getState
getSyntheticEvent
inputFileDismissed
offerDownload
postSyntheticEvent
processName
receiveFileSelection
receiveFileUpload
receiveInputDialog
receiveInputEvent
setTitle
syntheticEventReady
Inherited from WebResourceInit
:
connectUI
processRequest
Inherited from WebLayoutWindow
:
createFrame
flushWin
winFromPath
Inherited from WebWindow
:
clearWindow
sendWinEvent
sendWinEventTo
write
Inherited from WebResourceResFile
:
isTextFile
matchRequest
Inherited from WebResource
:
sendAck
sendXML
Properties
curCmdClient
Client session for current command line input. Certain modal interactions, such as file dialogs, are directed only to the client that initiated the current command.
fileDialogResult
file dialog result - this is a result list using the same format as the native inputFile() function
fileDialogState
file dialog state - this is the XML describing the currently open file dialog; if the dialog isn’t open, this is an empty string
inputDialogResult
input dialog result - this is the button number the user selected
inputDialogState
input dialog state - this is the XML describing an input dialog while a dialog is running, or an empty string if not
inputEventResult
input event result
inputEventState
input event state
menuSysState
menuSys state - menu system state (maintained by the menu module)
name
OVERRIDDEN
the top window is always called “main”
pathName
OVERRIDDEN
no description available
synthEventQueue
Synthetic event queue. This is a vector of synthetic events, set up in the [type, params…] format that the system inputEvent() function and related functions use. The ‘type’ code for a synthetic evente is a string instead of the numeric identifier that the system functions use.
title
the window title
vpath
OVERRIDDEN
match the webuires directory path as the URL path, but map this to main.html as the underlying resource name
Methods
getInputDialog (icon, prompt, buttons, defaultButton, cancelButton)
show a generic inputDialog dialog
getInputEvent (timeout)
wait for an input event
getInputFile (prompt, dialogType, fileType, flags)
show the file selector dialog
getInputFileFromClient (prompt, dialogType, fileType, flags)
Get an input file from the client PC. We’ll attempt to upload or download a file from/to the client PC, using a local temporary file for the actual file operations. This is a special form of the input file dialog that we use when we’re not connected to a storage server.
getState (client)
OVERRIDDEN
get the state
getSyntheticEvent ( )
pull the next synthetic event from the queue
inputFileDismissed ( )
receive notification that the file dialog has been closed
offerDownload (file)
Offer a file for download to the client. ‘file’ is a DownloadTempFile object previously created by a call to inputFile().
postSyntheticEvent (id, [params])
Post a synthetic event. A synthetic event looks like a regular UI or network event, but is generated internally instead of being delivered from the underlying browser or network subsystems.
‘id’ is a string giving the event type. The remaining parameters are up to each event type to define.
processName (n)
OVERRIDDEN
no description available
receiveFileSelection (req, query)
receive a file selection from the file selector dialog
receiveFileUpload (req, query)
receive a file upload from the file upload dialog
receiveInputDialog (req, query)
receive a selection from the input dialog
receiveInputEvent (req, query)
receive an input event
setTitle (title)
set the window title
syntheticEventReady ( )
is a synthetic event ready?
TADS 3 Library Manual
Generated on 5/16/2013 from TADS version 3.1.3