Packages
 Comm
 DB
 Input
 Interface
 Module
 Token
 User

Objects
 bitmapwidget
 databasenode
 dragdata
 textwidget
 tokeninstance
 widget
 widgetcontainer

Elements
 buttoncontrol
 categoryselectioncontrol
 chatentry
 chatwindow
 databasecontrol
 diecontrol
 diefield
 formattedtextcontrol
 formattedtextfield
 genericcontrol
 imagecontrol
 numbercontrol
 numberfield
 portraitselectioncontrol
 script
 scrollercontrol
 stringcontrol
 stringfield
 subwindow
 textbasecontrol
 tokenbag
 tokencontrol
 tokenfield
 windowclass
 windowcontrol
 windowinstance
 windowlist
 windowreferencecontrol
 windowreferencefield

Components
 categoryselectionsettings
 characterdbroot
 customdie
 die
 font
 framedef
 desktopframe
 hotkeybar
 icon
 imageupdatefolder
 importinfo
 includefile
 panel
 portraitset
 template
 tokenroot
 tooltip
onDeliverMessage
onSlashCommand



Inherits windowcontrol
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

event 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

handler 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