Packages
 Comm
 DB
 Debug
 Extension
 Input
 Interface
 Module
 Token
 User

Objects
 bitmapwidget
 databasenode
 dragdata
 textbasecontrol
 textwidget
 tokeninstance
 widget
 widgetcontainer
 windowcontrol
 windowinstance

Controls
 buttoncontrol
 buttonfield
 categoryselectioncontrol
 chatentry
 chatwindow
 databasecontrol
 diecontrol
 diefield
 formattedtextcontrol
 formattedtextfield
 genericcontrol
 imagecontrol
 numbercontrol
 numberfield
 portraitselectioncontrol
 scrollbarcontrol
 scrollercontrol
 stringcontrol
 stringfield
 subwindow
 tokenbag
 tokencontrol
 tokenfield
 windowlist
 windowreferencecontrol
 windowreferencefield

Assets and Settings
 announcement
 categoryselectionsettings
 characterdbroot
 customdie
 description
 desktopframe
 die
 diebox
 distance
 font
 framedef
 hotkeybar
 icon
 imageupdatefolder
 imagesettings
 importinfo
 importruleset
 includefile
 panel
 pollbox
 portraitset
 properties
 replaces
 script
 string
 template
 textsettings
 tokenroot
 tooltip
 windowclass
onDeliverMessage
onSlashCommand



Inherits windowcontrol textbasecontrol
Context windowinstance

This control defines the main chat entry control. The recommended location for it is in a desktop panel. Only one instance of the control can exist, attempts to create more than one will fail.

Slash commands, i.e. chat entries that start with the "/" character and a single command word immediately following, can be registered for special handling. Slash command handlers will receive one parameter, a string containing the remainder of the chat line following the command that can be used to issue parameters. Built in slash commands will precede any handlers defined.

See Comm package for details on the chat message structure.



Definition

<chatentry >
<chatwindow > ... </chatwindow> The name of the chatwindow receiving messages from this element
<state > Details for the chat state indicator
<position > ... </position> The position of the indicator relative to the application window
<speak > ... </speak> The icon used for speak messages
<story > ... </story> The icon used for story messages
<action > ... </action> The icon used for action messages
<emote > ... </emote> The icon used for emote messages
<ooc > ... </ooc> The icon used for ooc messages
</state>
</chatentry>


Interface


onDeliverMessage

function onDeliverMessage(messagedata, mode)

If present, this function is called whenever the user sends a chat message (other than a slash command) using the control.

The function is given data about the chat entry. The entry may be modified and returned as such, or the function may override the processing of the entry.

Parameters

messagedata   (table)   

A table containing information about the message. See the chatentry description for details.

mode   (string)   

Specifies the mode used to send the message. One of the values "chat", "ooc", "act", "emote" or "story".

Return values

(...)
A boolean value of true indicates that the framework should process the message as is, false that the message should not be processed. A table value will be treated as the message data substituted in place of the data given as a parameter.

onSlashCommand

function onSlashCommand(command, parameterstring)

Called when the user submits chat messages starting with a slash ("/") character. Built in slash commands will precede any specified using this function.

Parameters

command   (string)   

The string containing the slash command, including the leading slash character.

parameterstring   (string)   

The unparsed string following the slash command, as present in the user input



'Fantasy Grounds' is a trademark of SmiteWorks Ltd. All other trademarks are the property of their respective owners.
© 2004-2010 SmiteWorks Ltd. ALL RIGHTS RESERVED.
Privacy policy